use wrapper rect

This commit is contained in:
Benjamin Palko 2025-09-07 12:21:33 -04:00
parent 112ed0d6de
commit 351fb82ac7
12 changed files with 75 additions and 91 deletions

View file

@ -5,51 +5,48 @@ import qs.utils
import QtQuick
import QtQuick.Layouts
StyledRectangle {
RowLayout {
RowLayout {
Ref {
service: NetworkService
}
Ref {
service: NetworkService
}
LucideIcon {
id: icon
text: Styling.lucide.icons.wifiOff
states: [
State {
name: "high"
when: NetworkService.active?.strength > 50
PropertyChanges {
icon {
text: Styling.lucide.icons.wifi
}
}
},
State {
name: "medium"
when: NetworkService.active?.strength > 25
PropertyChanges {
icon {
text: Styling.lucide.icons.wifiHigh
}
}
},
State {
name: "low"
when: NetworkService.active?.strength > 0
PropertyChanges {
icon {
text: Styling.lucide.icons.wifiLow
}
LucideIcon {
id: icon
text: Styling.lucide.icons.wifiOff
states: [
State {
name: "high"
when: NetworkService.active?.strength > 50
PropertyChanges {
icon {
text: Styling.lucide.icons.wifi
}
}
]
}
},
State {
name: "medium"
when: NetworkService.active?.strength > 25
PropertyChanges {
icon {
text: Styling.lucide.icons.wifiHigh
}
}
},
State {
name: "low"
when: NetworkService.active?.strength > 0
PropertyChanges {
icon {
text: Styling.lucide.icons.wifiLow
}
}
}
]
}
StyledText {
id: text
text: ` ${(NetworkService.active?.strength ?? 0).toFixed()}%`
}
StyledText {
id: text
text: ` ${(NetworkService.active?.strength ?? 0).toFixed()}%`
}
}