add charging indicator for statusIcons
This commit is contained in:
parent
051c1815b3
commit
32a385bfb7
15
:w
Normal file
15
:w
Normal file
@ -0,0 +1,15 @@
|
||||
import QtQuick
|
||||
import "../settings/"
|
||||
import "../"
|
||||
|
||||
Text {
|
||||
property real fill
|
||||
font.family: "Material Symbols Rounded"
|
||||
color: Colors.foreground
|
||||
font.pixelSize: Settings.config.fontSize + 2
|
||||
font.variableAxes: {
|
||||
wght: 700,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -28,9 +28,7 @@ Variants {
|
||||
property var screen: root.modelData
|
||||
Layout.leftMargin: 10
|
||||
}
|
||||
Title {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
Title {}
|
||||
}
|
||||
|
||||
Row {
|
||||
|
||||
@ -19,11 +19,10 @@ Loader {
|
||||
property bool frame4: UPower.displayDevice.percentage < 0.74
|
||||
property bool frame5: UPower.displayDevice.percentage < 0.90
|
||||
property bool frame6: UPower.displayDevice.percentage <= 1
|
||||
property bool charging: UPower.displayDevice.Charging
|
||||
|
||||
function getBatteryIcon() {
|
||||
if (charging) {
|
||||
return "battery_android_frame_bolt"
|
||||
if (UPower.displayDevice.state == UPowerDeviceState.Charging) {
|
||||
return "battery_android_frame_bolt";
|
||||
}
|
||||
if (frame1) {
|
||||
return "battery_android_frame_1";
|
||||
@ -49,8 +48,8 @@ Loader {
|
||||
implicitHeight: Settings.config.barHeight
|
||||
|
||||
Row {
|
||||
anchors.centerIn: parent
|
||||
id: batRow
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 5
|
||||
CustomText {
|
||||
id: batText
|
||||
@ -60,7 +59,6 @@ Loader {
|
||||
id: batIcon
|
||||
text: root.getBatteryIcon()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,7 +7,6 @@ Item {
|
||||
id: root
|
||||
implicitWidth: trayRow.implicitWidth
|
||||
implicitHeight: Settings.config.barHeight
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Row {
|
||||
id: trayRow
|
||||
|
||||
@ -33,18 +33,20 @@ Item {
|
||||
implicitWidth: textRow.implicitWidth + 10
|
||||
implicitHeight: Settings.config.barHeight
|
||||
Row {
|
||||
id: textRow
|
||||
anchors.centerIn: parent
|
||||
spacing: 5
|
||||
id: textRow
|
||||
CustomText {
|
||||
id: volumeText
|
||||
PwObjectTracker {
|
||||
objects: Pipewire.ready ? Pipewire.defaultAudioSink : []
|
||||
}
|
||||
text: Pipewire.ready ? Math.round(root.sink.audio.volume * 100) + "%" : "failure"
|
||||
opacity: root.sink.audio.muted ? 0.5 : 1
|
||||
}
|
||||
CustomIcon {
|
||||
id: volumeIcon
|
||||
opacity: root.sink.audio.muted ? 0.5 : 1
|
||||
text: root.getVolumeIcon()
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,5 +7,9 @@ Text {
|
||||
font.family: "Material Symbols Rounded"
|
||||
color: Colors.foreground
|
||||
font.pixelSize: Settings.config.fontSize + 2
|
||||
font.weight: 500
|
||||
font.variableAxes: ({
|
||||
FILL: fill.toFixed(1),
|
||||
GRAD: 200,
|
||||
wght: 400
|
||||
})
|
||||
}
|
||||
|
||||
@ -3,8 +3,11 @@ import "../settings/"
|
||||
import "../"
|
||||
|
||||
Text {
|
||||
font.weight: 900
|
||||
color: Colors.foreground
|
||||
font.family: Settings.config.font
|
||||
font.pixelSize: Settings.config.fontSize
|
||||
font.variableAxes: ({
|
||||
GRAD: 200,
|
||||
wght: 400
|
||||
})
|
||||
}
|
||||
|
||||
@ -23,8 +23,8 @@ Singleton {
|
||||
id: settingsAdapter
|
||||
property var currentWall: "/home/lucy/.walls/faris.jpg"
|
||||
property var barHeight: 28
|
||||
property var font: "JetBrainsMono Nerd Font"
|
||||
property var fontSize: 12
|
||||
property var font: "SauceCodePro Nerd Font Mono"
|
||||
property var fontSize: 14
|
||||
property var rounding: 10
|
||||
property var wallDir: "/home/lucy/.walls"
|
||||
property bool floating: true
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
"barHeight": 28,
|
||||
"currentWall": "/home/lucy/.walls/faris.jpg",
|
||||
"floating": true,
|
||||
"font": "JetBrainsMono Nerd Font",
|
||||
"fontSize": 12,
|
||||
"font": "SauceCodePro Nerd Font Mono",
|
||||
"fontSize": 14,
|
||||
"paddingSides": 10,
|
||||
"paddingTop": 10,
|
||||
"rounding": 10,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user