From 1eeff4798e8ebbd30eb41184a7cdd25e73e1b8a0 Mon Sep 17 00:00:00 2001 From: lucy Date: Sun, 1 Feb 2026 23:59:09 +0100 Subject: [PATCH] fix icon centering issue fr --- modules/bar/Battery.qml | 6 +++++- modules/bar/Mpris.qml | 5 ++++- modules/bar/Volume.qml | 2 ++ modules/widgets/wallswitcher/WallSwitcher.qml | 13 ++++++++++--- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/modules/bar/Battery.qml b/modules/bar/Battery.qml index 2caea23..15ead3b 100644 --- a/modules/bar/Battery.qml +++ b/modules/bar/Battery.qml @@ -1,4 +1,5 @@ import Quickshell.Services.UPower +import QtQuick.Layouts import QtQuick import Quickshell.Widgets import Qt5Compat.GraphicalEffects @@ -68,17 +69,20 @@ Loader { implicitWidth: batRow.width implicitHeight: Settings.config.barHeight - Row { + RowLayout { id: batRow anchors.verticalCenter: parent.verticalCenter spacing: 5 CustomText { id: batText + + Layout.topMargin: 2 anchors.verticalCenter: parent.verticalCenter text: Math.round(UPower.displayDevice.percentage * 100) + "%" } CustomIcon { id: batIcon + Layout.topMargin: 2 font.family: "Material Symbols Rounded" text: root.getBatteryIcon() } diff --git a/modules/bar/Mpris.qml b/modules/bar/Mpris.qml index 5047c19..85b54a0 100644 --- a/modules/bar/Mpris.qml +++ b/modules/bar/Mpris.qml @@ -1,4 +1,5 @@ import QtQuick +import QtQuick.Layouts import Quickshell.Services.Mpris import qs import qs.settings @@ -26,7 +27,7 @@ Rectangle { implicitWidth: statusRow.implicitWidth implicitHeight: statusRow.implicitHeight - Row { + RowLayout { id: statusRow spacing: 5 anchors.verticalCenter: parent.verticalCenter @@ -34,10 +35,12 @@ Rectangle { property var status: root.spotify != null ? !root.spotify.isPlaying ? "play_arrow" : "pause" : "" CustomText { id: mprisText + Layout.topMargin: 2 text: root.spotify != null ? parent.combinedText : "" } CustomIcon { id: mprisStatus + Layout.topMargin: 2 text: root.spotify != null ? parent.status : "" } } diff --git a/modules/bar/Volume.qml b/modules/bar/Volume.qml index 81149a0..391bf17 100644 --- a/modules/bar/Volume.qml +++ b/modules/bar/Volume.qml @@ -42,6 +42,7 @@ Rectangle { anchors.centerIn: parent CustomText { id: volumeText + Layout.topMargin: 2 PwObjectTracker { objects: Pipewire.ready ? Pipewire.defaultAudioSink : [] @@ -51,6 +52,7 @@ Rectangle { } CustomIcon { id: volumeIcon + Layout.topMargin: 2 Layout.alignment: Qt.AlignVCenter opacity: Pipewire.ready ? root.sink.audio.muted ? 0.5 : 1 : 0 text: Pipewire.ready ? root.getVolumeIcon() : null diff --git a/modules/widgets/wallswitcher/WallSwitcher.qml b/modules/widgets/wallswitcher/WallSwitcher.qml index 0ae305d..351be04 100644 --- a/modules/widgets/wallswitcher/WallSwitcher.qml +++ b/modules/widgets/wallswitcher/WallSwitcher.qml @@ -35,8 +35,9 @@ FloatingWindow { ColumnLayout { id: windowLayout - spacing: 10 + spacing: 5 anchors.fill: parent + anchors.margins: 5 Rectangle { id: textWrapper @@ -44,7 +45,10 @@ FloatingWindow { Layout.margins: 10 Layout.alignment: Qt.AlignCenter Layout.bottomMargin: 0 - radius: 14 + topLeftRadius: 12 + topRightRadius: 12 + bottomLeftRadius: 4 + bottomRightRadius: 4 implicitHeight: 30 color: Colors.surfaceContainerLow CustomText { @@ -61,7 +65,10 @@ FloatingWindow { Layout.fillWidth: true Layout.fillHeight: true Layout.margins: 10 - radius: 14 + topLeftRadius: 4 + topRightRadius: 4 + bottomLeftRadius: 12 + bottomRightRadius: 12 color: Colors.surfaceContainerLow GridView { id: gridRoot