From 5dc0dc133dec95bd24219190d1e332b7bd185673 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 21 Apr 2025 21:31:33 +0200 Subject: [PATCH] safer property access + style adjustments --- .config/quickshell/ReloadPopup.qml | 1 - .config/quickshell/modules/common/widgets/MaterialSymbol.qml | 4 ++-- .../quickshell/modules/common/widgets/NotificationWidget.qml | 1 - .../modules/onScreenDisplay/OnScreenDisplayBrightness.qml | 2 +- .../modules/onScreenDisplay/OnScreenDisplayVolume.qml | 4 ++-- .../quickshell/modules/onScreenDisplay/OsdValueIndicator.qml | 1 + .config/quickshell/modules/session/Session.qml | 2 +- .config/quickshell/modules/session/SessionActionButton.qml | 1 + .config/quickshell/modules/sidebarRight/CenterWidgetGroup.qml | 2 +- .config/quickshell/modules/sidebarRight/SidebarRight.qml | 1 + .../sidebarRight/volumeMixer/AudioDeviceSelectorButton.qml | 1 + .config/quickshell/services/Audio.qml | 2 +- 12 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.config/quickshell/ReloadPopup.qml b/.config/quickshell/ReloadPopup.qml index 637141912..a0927d5b4 100644 --- a/.config/quickshell/ReloadPopup.qml +++ b/.config/quickshell/ReloadPopup.qml @@ -80,7 +80,6 @@ Scope { renderType: Text.NativeRendering font.family: "Rubik" font.pointSize: 14 - // color: Appearance.colors.colOnBackground text: root.failed ? "Quickshell: Reload failed" : "Quickshell reloaded" color: failed ? "#ff93000A" : "#ff0C1F13" } diff --git a/.config/quickshell/modules/common/widgets/MaterialSymbol.qml b/.config/quickshell/modules/common/widgets/MaterialSymbol.qml index 7891da690..324d77208 100644 --- a/.config/quickshell/modules/common/widgets/MaterialSymbol.qml +++ b/.config/quickshell/modules/common/widgets/MaterialSymbol.qml @@ -1,4 +1,4 @@ -import "root:/modules/common" +import "root:/modules/common/" import QtQuick import QtQuick.Layouts @@ -7,5 +7,5 @@ Text { verticalAlignment: Text.AlignVCenter font.family: Appearance.font.family.iconMaterial font.pixelSize: Appearance.font.pixelSize.small - color: Appearance.colors.colOnBackground + color: Appearance.m3colors.m3onBackground } diff --git a/.config/quickshell/modules/common/widgets/NotificationWidget.qml b/.config/quickshell/modules/common/widgets/NotificationWidget.qml index 5e2763c3f..4ae3ba9c6 100644 --- a/.config/quickshell/modules/common/widgets/NotificationWidget.qml +++ b/.config/quickshell/modules/common/widgets/NotificationWidget.qml @@ -381,7 +381,6 @@ Item { contentItem: MaterialSymbol { anchors.centerIn: parent - // text: expanded ? "keyboard_arrow_up" : "keyboard_arrow_down" text: "keyboard_arrow_down" horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter diff --git a/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayBrightness.qml b/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayBrightness.qml index 961ea6d4c..1c692264c 100644 --- a/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayBrightness.qml +++ b/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayBrightness.qml @@ -36,7 +36,7 @@ Scope { } Connections { - target: Audio.sink.audio + target: Audio.sink?.audio function onVolumeChanged() { if (!Audio.ready) return root.showOsdValues = false diff --git a/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayVolume.qml b/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayVolume.qml index c430e935c..f15f8acca 100644 --- a/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayVolume.qml +++ b/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayVolume.qml @@ -28,7 +28,7 @@ Scope { } Connections { - target: Audio.sink.audio + target: Audio.sink?.audio function onVolumeChanged() { if (!Audio.ready) return root.triggerOsd() @@ -97,7 +97,7 @@ Scope { OsdValueIndicator { id: osdValues anchors.centerIn: parent - value: Audio.sink.audio.volume + value: Audio.sink?.audio.volume icon: "volume_up" name: "Volume" } diff --git a/.config/quickshell/modules/onScreenDisplay/OsdValueIndicator.qml b/.config/quickshell/modules/onScreenDisplay/OsdValueIndicator.qml index d24074879..d79dd1e56 100644 --- a/.config/quickshell/modules/onScreenDisplay/OsdValueIndicator.qml +++ b/.config/quickshell/modules/onScreenDisplay/OsdValueIndicator.qml @@ -38,6 +38,7 @@ Item { Layout.leftMargin: valueIndicatorLeftPadding Layout.topMargin: valueIndicatorVerticalPadding Layout.bottomMargin: valueIndicatorVerticalPadding + color: Appearance.colors.colOnLayer0 text: root.icon font.pixelSize: 30 } diff --git a/.config/quickshell/modules/session/Session.qml b/.config/quickshell/modules/session/Session.qml index 620ee8353..f2d666cf7 100644 --- a/.config/quickshell/modules/session/Session.qml +++ b/.config/quickshell/modules/session/Session.qml @@ -200,7 +200,7 @@ Scope { Layout.alignment: Qt.AlignHCenter radius: Appearance.rounding.normal implicitHeight: sessionSubtitle.implicitHeight + 10 * 2 - implicitWidth: sessionSubtitle.implicitWidth + 10 * 2 + implicitWidth: sessionSubtitle.implicitWidth + 15 * 2 color: Appearance.colors.colTooltip clip: true diff --git a/.config/quickshell/modules/session/SessionActionButton.qml b/.config/quickshell/modules/session/SessionActionButton.qml index c27b0b268..545cfab54 100644 --- a/.config/quickshell/modules/session/SessionActionButton.qml +++ b/.config/quickshell/modules/session/SessionActionButton.qml @@ -53,6 +53,7 @@ Button { contentItem: MaterialSymbol { id: icon anchors.fill: parent + color: Appearance.colors.colOnLayer2 horizontalAlignment: Text.AlignHCenter text: buttonIcon font.pixelSize: 40 diff --git a/.config/quickshell/modules/sidebarRight/CenterWidgetGroup.qml b/.config/quickshell/modules/sidebarRight/CenterWidgetGroup.qml index 7fe0fd29d..1cd649d68 100644 --- a/.config/quickshell/modules/sidebarRight/CenterWidgetGroup.qml +++ b/.config/quickshell/modules/sidebarRight/CenterWidgetGroup.qml @@ -110,7 +110,7 @@ Rectangle { SwipeView { id: swipeView - Layout.topMargin: 10 + Layout.topMargin: 5 Layout.fillWidth: true Layout.fillHeight: true currentIndex: currentTab diff --git a/.config/quickshell/modules/sidebarRight/SidebarRight.qml b/.config/quickshell/modules/sidebarRight/SidebarRight.qml index 2d9037923..576015ab9 100644 --- a/.config/quickshell/modules/sidebarRight/SidebarRight.qml +++ b/.config/quickshell/modules/sidebarRight/SidebarRight.qml @@ -91,6 +91,7 @@ Scope { Layout.fillHeight: false spacing: 10 Layout.margins: 10 + Layout.topMargin: 5 Layout.bottomMargin: 0 CustomIcon { diff --git a/.config/quickshell/modules/sidebarRight/volumeMixer/AudioDeviceSelectorButton.qml b/.config/quickshell/modules/sidebarRight/volumeMixer/AudioDeviceSelectorButton.qml index 4b28980f8..1e235adea 100644 --- a/.config/quickshell/modules/sidebarRight/volumeMixer/AudioDeviceSelectorButton.qml +++ b/.config/quickshell/modules/sidebarRight/volumeMixer/AudioDeviceSelectorButton.qml @@ -37,6 +37,7 @@ Button { Layout.alignment: Qt.AlignVCenter Layout.fillWidth: false Layout.leftMargin: 5 + color: Appearance.colors.colOnLayer2 font.pixelSize: Appearance.font.pixelSize.hugeass text: input ? "mic_external_on" : "media_output" } diff --git a/.config/quickshell/services/Audio.qml b/.config/quickshell/services/Audio.qml index 80c59f164..5d97c3a3d 100644 --- a/.config/quickshell/services/Audio.qml +++ b/.config/quickshell/services/Audio.qml @@ -7,7 +7,7 @@ pragma ComponentBehavior: Bound Singleton { id: root - property bool ready: Pipewire.defaultAudioSink.ready + property bool ready: Pipewire.defaultAudioSink?.ready property var sink: Pipewire.defaultAudioSink property var source: Pipewire.defaultAudioSource