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

View File

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