diff --git a/:w b/:w new file mode 100644 index 0000000..422c0ce --- /dev/null +++ b/:w @@ -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, + + } + +} diff --git a/modules/Bar/Bar.qml b/modules/Bar/Bar.qml index e0da133..1e12357 100644 --- a/modules/Bar/Bar.qml +++ b/modules/Bar/Bar.qml @@ -28,9 +28,7 @@ Variants { property var screen: root.modelData Layout.leftMargin: 10 } - Title { - anchors.verticalCenter: parent.verticalCenter - } + Title {} } Row { @@ -47,7 +45,7 @@ Variants { Volume {} Battery {} SystemTray { - Layout.rightMargin: 10 + Layout.rightMargin: 10 } } } diff --git a/modules/Bar/Battery.qml b/modules/Bar/Battery.qml index 456eca5..004ac50 100644 --- a/modules/Bar/Battery.qml +++ b/modules/Bar/Battery.qml @@ -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"; @@ -48,19 +47,18 @@ Loader { implicitWidth: batRow.implicitWidth implicitHeight: Settings.config.barHeight - Row { - anchors.centerIn: parent - id: batRow - spacing: 5 - CustomText { - id: batText - text: Math.round(UPower.displayDevice.percentage * 100) + "%" - } - CustomIcon { - id: batIcon - text: root.getBatteryIcon() - } - + Row { + id: batRow + anchors.verticalCenter: parent.verticalCenter + spacing: 5 + CustomText { + id: batText + text: Math.round(UPower.displayDevice.percentage * 100) + "%" + } + CustomIcon { + id: batIcon + text: root.getBatteryIcon() } } + } } diff --git a/modules/Bar/SystemTray.qml b/modules/Bar/SystemTray.qml index a1edcbc..73e0737 100644 --- a/modules/Bar/SystemTray.qml +++ b/modules/Bar/SystemTray.qml @@ -7,7 +7,6 @@ Item { id: root implicitWidth: trayRow.implicitWidth implicitHeight: Settings.config.barHeight - anchors.verticalCenter: parent.verticalCenter Row { id: trayRow diff --git a/modules/Bar/Volume.qml b/modules/Bar/Volume.qml index e67bac4..36fc862 100644 --- a/modules/Bar/Volume.qml +++ b/modules/Bar/Volume.qml @@ -33,19 +33,21 @@ 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 - text: root.getVolumeIcon() + id: volumeIcon + opacity: root.sink.audio.muted ? 0.5 : 1 + text: root.getVolumeIcon() } } } diff --git a/reusables/CustomIcon.qml b/reusables/CustomIcon.qml index 6fe6e49..52f1c9d 100644 --- a/reusables/CustomIcon.qml +++ b/reusables/CustomIcon.qml @@ -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 + }) } diff --git a/reusables/CustomText.qml b/reusables/CustomText.qml index 639e2ff..1c54b5e 100644 --- a/reusables/CustomText.qml +++ b/reusables/CustomText.qml @@ -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 + }) } diff --git a/settings/Settings.qml b/settings/Settings.qml index 1c7c9f7..92e6f52 100644 --- a/settings/Settings.qml +++ b/settings/Settings.qml @@ -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 diff --git a/settings/config.json b/settings/config.json index 6552962..d6ce790 100644 --- a/settings/config.json +++ b/settings/config.json @@ -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,