Compare commits

...

4 commits

Author SHA1 Message Date
Damocles
6f80224d6c use BarLabel instead of Text 2026-04-12 14:52:23 +02:00
Damocles
ed72d81f3b more more colors 2026-04-12 14:51:21 +02:00
Damocles
c4e4b6ebb2 more colors 2026-04-12 14:46:42 +02:00
Damocles
67e8a27b3d close previous menu when opening new one 2026-04-12 14:45:30 +02:00
16 changed files with 52 additions and 36 deletions

View file

@ -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
}

View file

@ -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: {

View file

@ -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 {

View file

@ -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")

View file

@ -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
}
}

View file

@ -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
}
}

View file

@ -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

View file

@ -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
}
}

View file

@ -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
}

View file

@ -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
}
}

View file

@ -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
}

View file

@ -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";

View file

@ -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
}
}

View file

@ -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;
}
}
}
}

View file

@ -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
}

View file

@ -4,6 +4,7 @@ import "." as M
M.BarIcon {
icon: "\uF011"
color: M.Theme.base08
tooltip: "Open logout menu"
Process {