diff --git a/modules/Backlight.qml b/modules/Backlight.qml index 9f1041c..04f05f7 100644 --- a/modules/Backlight.qml +++ b/modules/Backlight.qml @@ -45,12 +45,10 @@ 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 a138917..b57ff76 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.base0B + : M.Theme.base05 M.BarIcon { icon: { diff --git a/modules/Bluetooth.qml b/modules/Bluetooth.qml index 64e35f8..b24d81b 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.base0D + : M.Theme.base05 anchors.verticalCenter: parent.verticalCenter } M.BarLabel { diff --git a/modules/Clock.qml b/modules/Clock.qml index 58c4d54..6506124 100644 --- a/modules/Clock.qml +++ b/modules/Clock.qml @@ -8,7 +8,6 @@ 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 01ea93d..b9f81fa 100644 --- a/modules/Cpu.qml +++ b/modules/Cpu.qml @@ -54,12 +54,13 @@ M.BarSection { M.BarIcon { icon: "\uF2DB" - color: M.Theme.base08 anchors.verticalCenter: parent.verticalCenter } - M.BarLabel { - label: root.usage.toString().padStart(2) + "%@" + root.freqGhz.toFixed(2) - 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 } } diff --git a/modules/Disk.qml b/modules/Disk.qml index c8eb68b..9179fb8 100644 --- a/modules/Disk.qml +++ b/modules/Disk.qml @@ -34,12 +34,13 @@ M.BarSection { M.BarIcon { icon: "\uF0C9" - color: M.Theme.base09 anchors.verticalCenter: parent.verticalCenter } - M.BarLabel { - label: root.freePct + "% " + root.totalTb.toFixed(1) - 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 } } diff --git a/modules/IdleInhibitor.qml b/modules/IdleInhibitor.qml index e24543c..d2b0fbe 100644 --- a/modules/IdleInhibitor.qml +++ b/modules/IdleInhibitor.qml @@ -4,7 +4,6 @@ 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 3b7d81f..dda864f 100644 --- a/modules/Memory.qml +++ b/modules/Memory.qml @@ -34,12 +34,13 @@ M.BarSection { M.BarIcon { icon: "\uEFC5" - color: M.Theme.base0B anchors.verticalCenter: parent.verticalCenter } - M.BarLabel { - label: root.percent + "%" - 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 } } diff --git a/modules/Mpris.qml b/modules/Mpris.qml index 7e573dd..ddfa187 100644 --- a/modules/Mpris.qml +++ b/modules/Mpris.qml @@ -25,12 +25,10 @@ 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 9afde20..820771b 100644 --- a/modules/Network.qml +++ b/modules/Network.qml @@ -61,13 +61,15 @@ M.BarSection { return "\uDB85\uDE16"; return "\uDB82\uDCFD"; } - color: root.state === "disconnected" ? M.Theme.base08 : M.Theme.base0C + color: root.state === "disconnected" ? M.Theme.base08 : M.Theme.base05 anchors.verticalCenter: parent.verticalCenter } - M.BarLabel { + Text { visible: root.state === "wifi" - label: root.essid - color: root.state === "disconnected" ? M.Theme.base08 : M.Theme.base0C + text: root.essid + 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/Notifications.qml b/modules/Notifications.qml index 7e3f76e..7f5fae4 100644 --- a/modules/Notifications.qml +++ b/modules/Notifications.qml @@ -44,12 +44,10 @@ 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 904492f..c770ea3 100644 --- a/modules/PowerProfile.qml +++ b/modules/PowerProfile.qml @@ -8,10 +8,6 @@ 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 9b1d98e..304cc7b 100644 --- a/modules/Temperature.qml +++ b/modules/Temperature.qml @@ -8,9 +8,6 @@ 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 @@ -26,12 +23,14 @@ M.BarSection { M.BarIcon { icon: "\uF2C9" - color: root._stateColor + color: root.celsius > 80 ? M.Theme.base08 : M.Theme.base05 anchors.verticalCenter: parent.verticalCenter } - M.BarLabel { - label: root.celsius + "\u00B0C" - 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 } } diff --git a/modules/Tray.qml b/modules/Tray.qml index 3860620..9b9de01 100644 --- a/modules/Tray.qml +++ b/modules/Tray.qml @@ -9,7 +9,6 @@ RowLayout { spacing: M.Theme.moduleSpacing + 2 required property var bar - property var _activeMenu: null Repeater { model: SystemTray.items @@ -49,10 +48,7 @@ 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(); } @@ -68,10 +64,7 @@ RowLayout { handle: iconItem.modelData.menu screen: root.bar.screen anchorX: iconItem.mapToGlobal(iconItem.width / 2, 0).x - onMenuClosed: { - menuLoader.active = false; - root._activeMenu = null; - } + onMenuClosed: menuLoader.active = false } } } diff --git a/modules/Volume.qml b/modules/Volume.qml index 4c65a17..36fa57f 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.base0E + 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.base0E + color: root.muted ? M.Theme.base04 : M.Theme.base05 anchors.verticalCenter: parent.verticalCenter } diff --git a/modules/Wlogout.qml b/modules/Wlogout.qml index 1d4bd21..48825f3 100644 --- a/modules/Wlogout.qml +++ b/modules/Wlogout.qml @@ -4,7 +4,6 @@ import "." as M M.BarIcon { icon: "\uF011" - color: M.Theme.base08 tooltip: "Open logout menu" Process {