diff --git a/modules/Backlight.qml b/modules/Backlight.qml index 04f05f7..9f1041c 100644 --- a/modules/Backlight.qml +++ b/modules/Backlight.qml @@ -45,10 +45,12 @@ M.BarSection { M.BarIcon { icon: "\uF185" + color: M.Theme.base0A anchors.verticalCenter: parent.verticalCenter } M.BarLabel { label: root.percent + "%" + color: M.Theme.base0A anchors.verticalCenter: parent.verticalCenter } diff --git a/modules/Battery.qml b/modules/Battery.qml index b57ff76..a138917 100644 --- a/modules/Battery.qml +++ b/modules/Battery.qml @@ -20,7 +20,7 @@ M.BarSection { readonly property color _stateColor: charging ? M.Theme.base0B : pct < 15 ? M.Theme.base08 : pct < 30 ? M.Theme.base09 - : M.Theme.base05 + : M.Theme.base0B M.BarIcon { icon: { diff --git a/modules/Bluetooth.qml b/modules/Bluetooth.qml index b24d81b..64e35f8 100644 --- a/modules/Bluetooth.qml +++ b/modules/Bluetooth.qml @@ -54,7 +54,7 @@ M.BarSection { icon: "\uF294" color: root.state === "connected" ? M.Theme.base0D : root.state === "off" ? M.Theme.base04 - : M.Theme.base05 + : M.Theme.base0D anchors.verticalCenter: parent.verticalCenter } M.BarLabel { diff --git a/modules/Clock.qml b/modules/Clock.qml index 6506124..58c4d54 100644 --- a/modules/Clock.qml +++ b/modules/Clock.qml @@ -8,6 +8,7 @@ M.BarLabel { precision: SystemClock.Seconds } + color: M.Theme.base0D font.pixelSize: M.Theme.fontSize + 1 label: Qt.formatDateTime(clock.date, "ddd, dd. MMM HH:mm") tooltip: Qt.formatDateTime(clock.date, "dddd, dd. MMMM yyyy\nHH:mm:ss") diff --git a/modules/Cpu.qml b/modules/Cpu.qml index b9f81fa..01ea93d 100644 --- a/modules/Cpu.qml +++ b/modules/Cpu.qml @@ -54,13 +54,12 @@ M.BarSection { M.BarIcon { icon: "\uF2DB" + color: M.Theme.base08 anchors.verticalCenter: parent.verticalCenter } - Text { - text: root.usage.toString().padStart(2) + "%@" + root.freqGhz.toFixed(2) - color: M.Theme.base05 - font.pixelSize: M.Theme.fontSize - font.family: M.Theme.fontFamily - verticalAlignment: Text.AlignVCenter + M.BarLabel { + label: root.usage.toString().padStart(2) + "%@" + root.freqGhz.toFixed(2) + color: M.Theme.base08 + anchors.verticalCenter: parent.verticalCenter } } diff --git a/modules/Disk.qml b/modules/Disk.qml index 9179fb8..c8eb68b 100644 --- a/modules/Disk.qml +++ b/modules/Disk.qml @@ -34,13 +34,12 @@ M.BarSection { M.BarIcon { icon: "\uF0C9" + color: M.Theme.base09 anchors.verticalCenter: parent.verticalCenter } - Text { - text: root.freePct + "% " + root.totalTb.toFixed(1) - color: M.Theme.base05 - font.pixelSize: M.Theme.fontSize - font.family: M.Theme.fontFamily - verticalAlignment: Text.AlignVCenter + M.BarLabel { + label: root.freePct + "% " + root.totalTb.toFixed(1) + color: M.Theme.base09 + anchors.verticalCenter: parent.verticalCenter } } diff --git a/modules/IdleInhibitor.qml b/modules/IdleInhibitor.qml index d2b0fbe..e24543c 100644 --- a/modules/IdleInhibitor.qml +++ b/modules/IdleInhibitor.qml @@ -4,6 +4,7 @@ import "." as M M.BarIcon { id: root + color: root.active ? M.Theme.base0A : M.Theme.base04 tooltip: "Idle inhibition: " + (root.active ? "active" : "inactive") property bool active: false diff --git a/modules/Memory.qml b/modules/Memory.qml index dda864f..3b7d81f 100644 --- a/modules/Memory.qml +++ b/modules/Memory.qml @@ -34,13 +34,12 @@ M.BarSection { M.BarIcon { icon: "\uEFC5" + color: M.Theme.base0B anchors.verticalCenter: parent.verticalCenter } - Text { - text: root.percent + "%" - color: M.Theme.base05 - font.pixelSize: M.Theme.fontSize - font.family: M.Theme.fontFamily - verticalAlignment: Text.AlignVCenter + M.BarLabel { + label: root.percent + "%" + color: M.Theme.base0B + anchors.verticalCenter: parent.verticalCenter } } diff --git a/modules/Mpris.qml b/modules/Mpris.qml index ddfa187..7e573dd 100644 --- a/modules/Mpris.qml +++ b/modules/Mpris.qml @@ -25,10 +25,12 @@ M.BarSection { M.BarIcon { icon: root.playing ? "\uF04B" : (root.player?.playbackState === MprisPlaybackState.Paused ? "\uDB80\uDFE4" : "\uDB81\uDCDB") + color: M.Theme.base0E anchors.verticalCenter: parent.verticalCenter } M.BarLabel { label: root.player?.trackTitle || root.player?.identity || "" + color: M.Theme.base0E anchors.verticalCenter: parent.verticalCenter } diff --git a/modules/Network.qml b/modules/Network.qml index 820771b..9afde20 100644 --- a/modules/Network.qml +++ b/modules/Network.qml @@ -61,15 +61,13 @@ M.BarSection { return "\uDB85\uDE16"; return "\uDB82\uDCFD"; } - color: root.state === "disconnected" ? M.Theme.base08 : M.Theme.base05 + color: root.state === "disconnected" ? M.Theme.base08 : M.Theme.base0C anchors.verticalCenter: parent.verticalCenter } - Text { + M.BarLabel { visible: root.state === "wifi" - text: root.essid - color: root.state === "disconnected" ? M.Theme.base08 : M.Theme.base05 - font.pixelSize: M.Theme.fontSize + 1 - font.family: M.Theme.fontFamily + label: root.essid + color: root.state === "disconnected" ? M.Theme.base08 : M.Theme.base0C anchors.verticalCenter: parent.verticalCenter } } diff --git a/modules/Notifications.qml b/modules/Notifications.qml index 7f5fae4..7e3f76e 100644 --- a/modules/Notifications.qml +++ b/modules/Notifications.qml @@ -44,10 +44,12 @@ M.BarSection { return root.count > 0 ? "\uDB80\uDCA0" : "\uDB82\uDE93"; return root.count > 0 ? "\uDB84\uDD6B" : "\uDB80\uDC9C"; } + color: root.count > 0 ? M.Theme.base09 : (root.dnd ? M.Theme.base04 : M.Theme.base09) anchors.verticalCenter: parent.verticalCenter } M.BarLabel { label: root.count > 0 ? String(root.count) : "" + color: M.Theme.base09 anchors.verticalCenter: parent.verticalCenter } diff --git a/modules/PowerProfile.qml b/modules/PowerProfile.qml index c770ea3..904492f 100644 --- a/modules/PowerProfile.qml +++ b/modules/PowerProfile.qml @@ -8,6 +8,10 @@ M.BarIcon { property string profile: "" + color: root.profile === "performance" ? M.Theme.base09 + : root.profile === "power-saver" ? M.Theme.base0B + : M.Theme.base05 + icon: { if (root.profile === "performance") return "\uF0E7"; diff --git a/modules/Temperature.qml b/modules/Temperature.qml index 304cc7b..9b1d98e 100644 --- a/modules/Temperature.qml +++ b/modules/Temperature.qml @@ -8,6 +8,9 @@ M.BarSection { tooltip: "Temperature: " + root.celsius + "\u00B0C" property int celsius: 0 + readonly property color _stateColor: celsius > 80 ? M.Theme.base08 + : celsius > 60 ? M.Theme.base09 + : M.Theme.base0C FileView { id: thermal @@ -23,14 +26,12 @@ M.BarSection { M.BarIcon { icon: "\uF2C9" - color: root.celsius > 80 ? M.Theme.base08 : M.Theme.base05 + color: root._stateColor anchors.verticalCenter: parent.verticalCenter } - Text { - text: root.celsius + "\u00B0C" - color: root.celsius > 80 ? M.Theme.base08 : M.Theme.base05 - font.pixelSize: M.Theme.fontSize - font.family: M.Theme.fontFamily - verticalAlignment: Text.AlignVCenter + M.BarLabel { + label: root.celsius + "\u00B0C" + color: root._stateColor + anchors.verticalCenter: parent.verticalCenter } } diff --git a/modules/Tray.qml b/modules/Tray.qml index 9b9de01..3860620 100644 --- a/modules/Tray.qml +++ b/modules/Tray.qml @@ -9,6 +9,7 @@ RowLayout { spacing: M.Theme.moduleSpacing + 2 required property var bar + property var _activeMenu: null Repeater { model: SystemTray.items @@ -48,7 +49,10 @@ RowLayout { iconItem.modelData.activate(); } else if (mouse.button === Qt.RightButton) { if (iconItem.modelData.menu) { + if (root._activeMenu && root._activeMenu !== menuLoader) + root._activeMenu.active = false; menuLoader.active = true; + root._activeMenu = menuLoader; } else { iconItem.modelData.secondaryActivate(); } @@ -64,7 +68,10 @@ RowLayout { handle: iconItem.modelData.menu screen: root.bar.screen anchorX: iconItem.mapToGlobal(iconItem.width / 2, 0).x - onMenuClosed: menuLoader.active = false + onMenuClosed: { + menuLoader.active = false; + root._activeMenu = null; + } } } } diff --git a/modules/Volume.qml b/modules/Volume.qml index 36fa57f..4c65a17 100644 --- a/modules/Volume.qml +++ b/modules/Volume.qml @@ -17,12 +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 + color: root.muted ? M.Theme.base04 : M.Theme.base0E anchors.verticalCenter: parent.verticalCenter } M.BarLabel { label: Math.round(root.volume * 100) + "%" - color: root.muted ? M.Theme.base04 : M.Theme.base05 + color: root.muted ? M.Theme.base04 : M.Theme.base0E anchors.verticalCenter: parent.verticalCenter } diff --git a/modules/Wlogout.qml b/modules/Wlogout.qml index 48825f3..1d4bd21 100644 --- a/modules/Wlogout.qml +++ b/modules/Wlogout.qml @@ -4,6 +4,7 @@ import "." as M M.BarIcon { icon: "\uF011" + color: M.Theme.base08 tooltip: "Open logout menu" Process {