change ws indicator

This commit is contained in:
lucy 2026-03-09 10:45:56 +01:00
parent acfc1c027c
commit aae2bfc2f8
2 changed files with 15 additions and 14 deletions

View File

@ -24,28 +24,28 @@ Rectangle {
if (charging) {
return "\uf250";
}
if (percentage < 0.12) {
if (percentage <= 0.12) {
return "\uf30d";
}
if (percentage < 0.24) {
if (percentage <= 0.24) {
return "\uf257";
}
if (percentage < 0.36) {
if (percentage <= 0.36) {
return "\uf256";
}
if (percentage < 0.48) {
if (percentage <= 0.48) {
return "\uf255";
}
if (percentage < 0.60) {
if (percentage <= 0.60) {
return "\uf254";
}
if (percentage < 0.72) {
if (percentage <= 0.72) {
return "\uf253";
}
if (percentage < 0.84) {
if (percentage <= 0.84) {
return "\uf252";
}
if (percentage > 0.84) {
if (percentage >= 0.84) {
return "\uf24f";
}
}
@ -53,13 +53,13 @@ Rectangle {
if (audioMute) {
return "\ue04f";
}
if (audioPercentage < 0.33) {
if (audioPercentage <= 0.33) {
return "\ue04e";
}
if (audioPercentage < 0.66) {
if (audioPercentage <= 0.66) {
return "\ue04d";
}
if (audioPercentage > 0.66) {
if (audioPercentage >= 0.66) {
return "\ue050";
}
}

View File

@ -16,7 +16,7 @@ Rectangle {
implicitHeight: wsLayout.implicitHeight + 6
RowLayout {
id: wsLayout
spacing: 0
spacing: 2
anchors.centerIn: parent
Repeater {
id: wsRep
@ -27,13 +27,14 @@ Rectangle {
implicitHeight: Settings.config.barHeight / 2
visible: modelData.id < 0 ? false : modelData.monitor?.name == wsWrap.barScreen.name
required property var modelData
color: modelData.focused ? ThemeLoader.colors.base05 : ThemeLoader.colors.base03
color: "transparent"
radius: Settings.config.rounding
CText {
id: wsText
anchors.centerIn: parent
text: wsRect.modelData.id
color: parent.modelData.focused ? ThemeLoader.colors.base00 : ThemeLoader.colors.base05
color: ThemeLoader.colors.base07
opacity: parent.modelData.focused ? 1 : 0.5
}
MouseArea {
id: mouseHandler