controlcenter: moved connection status/security type in networking
This commit is contained in:
parent
8c84f670e6
commit
4a7c2dbdd5
1 changed files with 53 additions and 36 deletions
|
|
@ -215,19 +215,27 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
elide: Text.ElideRight
|
|
||||||
maximumLineCount: 1
|
|
||||||
|
|
||||||
text: modelData.interface || qsTr("Unknown")
|
spacing: 0
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: modelData.connected ? qsTr("Connected") : qsTr("Disconnected")
|
Layout.fillWidth: true
|
||||||
color: modelData.connected ? Colours.palette.m3primary : Colours.palette.m3outline
|
elide: Text.ElideRight
|
||||||
font.pointSize: Appearance.font.size.small
|
maximumLineCount: 1
|
||||||
font.weight: modelData.connected ? 500 : 400
|
|
||||||
|
text: modelData.interface || qsTr("Unknown")
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: modelData.connected ? qsTr("Connected") : qsTr("Disconnected")
|
||||||
|
color: modelData.connected ? Colours.palette.m3primary : Colours.palette.m3outline
|
||||||
|
font.pointSize: Appearance.font.size.small
|
||||||
|
font.weight: modelData.connected ? 500 : 400
|
||||||
|
elide: Text.ElideRight
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledRect {
|
StyledRect {
|
||||||
|
|
@ -362,37 +370,46 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
elide: Text.ElideRight
|
|
||||||
maximumLineCount: 1
|
|
||||||
|
|
||||||
text: (modelData && modelData.ssid) ? modelData.ssid : qsTr("Unknown")
|
spacing: 0
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
spacing: Appearance.spacing.smaller
|
|
||||||
|
|
||||||
MaterialIcon {
|
|
||||||
visible: (modelData && modelData.isSecure)
|
|
||||||
text: "lock"
|
|
||||||
font.pointSize: Appearance.font.size.small
|
|
||||||
color: (modelData && modelData.active) ? Colours.palette.m3primary : Colours.palette.m3outline
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: {
|
Layout.fillWidth: true
|
||||||
if (!modelData) return qsTr("Open");
|
elide: Text.ElideRight
|
||||||
if (modelData.active) return qsTr("Connected");
|
maximumLineCount: 1
|
||||||
if (modelData.isSecure && modelData.security && modelData.security.length > 0) {
|
|
||||||
return modelData.security;
|
text: (modelData && modelData.ssid) ? modelData.ssid : qsTr("Unknown")
|
||||||
}
|
}
|
||||||
if (modelData.isSecure) return qsTr("Secured");
|
|
||||||
return qsTr("Open");
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: Appearance.spacing.smaller
|
||||||
|
|
||||||
|
MaterialIcon {
|
||||||
|
visible: (modelData && modelData.isSecure)
|
||||||
|
text: "lock"
|
||||||
|
font.pointSize: Appearance.font.size.small
|
||||||
|
color: (modelData && modelData.active) ? Colours.palette.m3primary : Colours.palette.m3outline
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: {
|
||||||
|
if (!modelData) return qsTr("Open");
|
||||||
|
if (modelData.active) return qsTr("Connected");
|
||||||
|
if (modelData.isSecure && modelData.security && modelData.security.length > 0) {
|
||||||
|
return modelData.security;
|
||||||
|
}
|
||||||
|
if (modelData.isSecure) return qsTr("Secured");
|
||||||
|
return qsTr("Open");
|
||||||
|
}
|
||||||
|
color: (modelData && modelData.active) ? Colours.palette.m3primary : Colours.palette.m3outline
|
||||||
|
font.pointSize: Appearance.font.size.small
|
||||||
|
font.weight: (modelData && modelData.active) ? 500 : 400
|
||||||
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
color: (modelData && modelData.active) ? Colours.palette.m3primary : Colours.palette.m3outline
|
|
||||||
font.pointSize: Appearance.font.size.small
|
|
||||||
font.weight: (modelData && modelData.active) ? 500 : 400
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue