diff --git a/modules/Battery.qml b/modules/Battery.qml index a8cf911..b57ff76 100644 --- a/modules/Battery.qml +++ b/modules/Battery.qml @@ -17,6 +17,10 @@ M.BarSection { readonly property var dev: UPower.displayDevice readonly property real pct: (dev?.percentage ?? 0) * 100 readonly property bool charging: dev?.state === UPowerDeviceState.Charging + readonly property color _stateColor: charging ? M.Theme.base0B + : pct < 15 ? M.Theme.base08 + : pct < 30 ? M.Theme.base09 + : M.Theme.base05 M.BarIcon { icon: { @@ -25,13 +29,13 @@ M.BarSection { const icons = ["\uDB80\uDC8E", "\uDB80\uDC7A", "\uDB80\uDC7B", "\uDB80\uDC7C", "\uDB80\uDC7D", "\uDB80\uDC7E", "\uDB80\uDC7F", "\uDB80\uDC80", "\uDB80\uDC81", "\uDB80\uDC82", "\uDB85\uDFE2"]; return icons[Math.min(10, Math.floor(root.pct / 10))]; } - color: root.pct < 15 ? M.Theme.base08 : M.Theme.base05 + color: root._stateColor font.pixelSize: M.Theme.fontSize + 2 anchors.verticalCenter: parent.verticalCenter } M.BarLabel { label: Math.round(root.pct) + "%" - color: root.pct < 15 ? M.Theme.base08 : M.Theme.base05 + color: root._stateColor anchors.verticalCenter: parent.verticalCenter } } diff --git a/modules/Bluetooth.qml b/modules/Bluetooth.qml index b0b26fc..b24d81b 100644 --- a/modules/Bluetooth.qml +++ b/modules/Bluetooth.qml @@ -52,7 +52,9 @@ M.BarSection { M.BarIcon { icon: "\uF294" - color: root.state === "off" ? M.Theme.base04 : M.Theme.base05 + color: root.state === "connected" ? M.Theme.base0D + : root.state === "off" ? M.Theme.base04 + : M.Theme.base05 anchors.verticalCenter: parent.verticalCenter } M.BarLabel { diff --git a/modules/Network.qml b/modules/Network.qml index f767a06..820771b 100644 --- a/modules/Network.qml +++ b/modules/Network.qml @@ -61,12 +61,13 @@ M.BarSection { return "\uDB85\uDE16"; return "\uDB82\uDCFD"; } + color: root.state === "disconnected" ? M.Theme.base08 : M.Theme.base05 anchors.verticalCenter: parent.verticalCenter } Text { visible: root.state === "wifi" text: root.essid - color: M.Theme.base05 + color: root.state === "disconnected" ? M.Theme.base08 : M.Theme.base05 font.pixelSize: M.Theme.fontSize + 1 font.family: M.Theme.fontFamily anchors.verticalCenter: parent.verticalCenter diff --git a/modules/Volume.qml b/modules/Volume.qml index 4868064..36fa57f 100644 --- a/modules/Volume.qml +++ b/modules/Volume.qml @@ -17,10 +17,12 @@ M.BarSection { M.BarIcon { icon: root.muted ? "\uF026" : (root.volume > 0.5 ? "\uF028" : (root.volume > 0 ? "\uF027" : "\uF026")) + color: root.muted ? M.Theme.base04 : M.Theme.base05 anchors.verticalCenter: parent.verticalCenter } M.BarLabel { label: Math.round(root.volume * 100) + "%" + color: root.muted ? M.Theme.base04 : M.Theme.base05 anchors.verticalCenter: parent.verticalCenter }