diff --git a/.config/quickshell/modules/common/Appearance.qml b/.config/quickshell/modules/common/Appearance.qml index b8fd1028a..8627835d9 100644 --- a/.config/quickshell/modules/common/Appearance.qml +++ b/.config/quickshell/modules/common/Appearance.qml @@ -260,18 +260,19 @@ Singleton { } sizes: QtObject { - property int barHeight: 40 - property int barCenterSideModuleWidth: 360 - property int barPreferredSideSectionWidth: 400 - property int sidebarWidth: 450 - property int sidebarWidthExtended: 750 - property int notificationPopupWidth: 410 - property int searchWidthCollapsed: 260 - property int searchWidth: 450 - property int hyprlandGapsOut: 5 - property int elevationMargin: 7 - property int fabShadowRadius: 5 - property int fabHoveredShadowRadius: 7 + property real barHeight: 40 + property real barCenterSideModuleWidth: 360 + property real barPreferredSideSectionWidth: 400 + property real sidebarWidth: 450 + property real sidebarWidthExtended: 750 + property real osdWidth: 200 + property real notificationPopupWidth: 410 + property real searchWidthCollapsed: 260 + property real searchWidth: 450 + property real hyprlandGapsOut: 5 + property real elevationMargin: 7 + property real fabShadowRadius: 5 + property real fabHoveredShadowRadius: 7 } syntaxHighlightingTheme: Appearance.m3colors.darkmode ? "Monokai" : "ayu Light" diff --git a/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayBrightness.qml b/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayBrightness.qml index 952951584..bec442a8a 100644 --- a/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayBrightness.qml +++ b/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayBrightness.qml @@ -70,21 +70,18 @@ Scope { item: osdValuesWrapper } - implicitWidth: columnLayout.implicitWidth + implicitWidth: Appearance.sizes.osdWidth implicitHeight: columnLayout.implicitHeight visible: osdLoader.active ColumnLayout { id: columnLayout anchors.horizontalCenter: parent.horizontalCenter - Item { - height: 1 // Prevent Wayland protocol error - } Item { id: osdValuesWrapper // Extra space for shadow - implicitHeight: true ? (osdValues.implicitHeight + Appearance.sizes.elevationMargin * 2) : 0 - implicitWidth: osdValues.implicitWidth + Appearance.sizes.elevationMargin * 2 + implicitHeight: osdValues.implicitHeight + Appearance.sizes.elevationMargin * 2 + implicitWidth: osdValues.implicitWidth clip: true MouseArea { @@ -102,8 +99,9 @@ Scope { OsdValueIndicator { id: osdValues - anchors.centerIn: parent - value: root.brightnessMonitor.brightness + anchors.fill: parent + anchors.margins: Appearance.sizes.elevationMargin + value: root.brightnessMonitor?.brightness ?? 50 icon: "light_mode" rotateIcon: true scaleIcon: true diff --git a/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayVolume.qml b/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayVolume.qml index d9c5b3bbf..3ecc01cde 100644 --- a/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayVolume.qml +++ b/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayVolume.qml @@ -72,21 +72,18 @@ Scope { item: osdValuesWrapper } - implicitWidth: columnLayout.implicitWidth + implicitWidth: Appearance.sizes.osdWidth implicitHeight: columnLayout.implicitHeight visible: osdLoader.active ColumnLayout { id: columnLayout anchors.horizontalCenter: parent.horizontalCenter - Item { - height: 1 // Prevent Wayland protocol error - } Item { id: osdValuesWrapper // Extra space for shadow - implicitHeight: true ? (osdValues.implicitHeight + Appearance.sizes.elevationMargin * 2) : 0 - implicitWidth: osdValues.implicitWidth + Appearance.sizes.elevationMargin * 2 + implicitHeight: osdValues.implicitHeight + Appearance.sizes.elevationMargin * 2 + implicitWidth: osdValues.implicitWidth clip: true MouseArea { @@ -104,14 +101,14 @@ Scope { OsdValueIndicator { id: osdValues - anchors.centerIn: parent + anchors.fill: parent + anchors.margins: Appearance.sizes.elevationMargin value: Audio.sink?.audio.volume ?? 0 icon: Audio.sink?.audio.muted ? "volume_off" : "volume_up" name: qsTr("Volume") } } } - } } diff --git a/.config/quickshell/modules/onScreenDisplay/OsdValueIndicator.qml b/.config/quickshell/modules/onScreenDisplay/OsdValueIndicator.qml index c079f1dad..36a9748b2 100644 --- a/.config/quickshell/modules/onScreenDisplay/OsdValueIndicator.qml +++ b/.config/quickshell/modules/onScreenDisplay/OsdValueIndicator.qml @@ -21,11 +21,12 @@ Item { property real valueIndicatorRightPadding: 20 // An icon is circle ish, a column isn't, hence the extra padding Layout.margins: Appearance.sizes.elevationMargin - implicitWidth: valueIndicator.implicitWidth + implicitWidth: Appearance.sizes.osdWidth implicitHeight: valueIndicator.implicitHeight WrapperRectangle { id: valueIndicator + anchors.fill: parent radius: Appearance.rounding.full color: Appearance.colors.colLayer0 implicitWidth: valueRow.implicitWidth @@ -33,9 +34,10 @@ Item { RowLayout { // Icon on the left, stuff on the right id: valueRow Layout.margins: 10 + anchors.fill: parent spacing: 10 - Item { + Item { implicitWidth: 30 implicitHeight: 30 Layout.alignment: Qt.AlignVCenter @@ -86,6 +88,7 @@ Item { StyledProgressBar { id: valueProgressBar + Layout.fillWidth: true value: root.value } }