From c48aca3d0c014bd3868ab7db6815cf6700480b2c Mon Sep 17 00:00:00 2001 From: kossLAN Date: Wed, 15 Oct 2025 15:47:35 -0400 Subject: [PATCH] fix: volume-osd popup --- shell/bar/Bar.qml | 10 ++++++---- shell/bar/Workspaces.qml | 2 +- shell/volume-osd/Controller.qml | 31 ++++++++++++++----------------- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/shell/bar/Bar.qml b/shell/bar/Bar.qml index 966b507..9c8eb04 100644 --- a/shell/bar/Bar.qml +++ b/shell/bar/Bar.qml @@ -40,18 +40,20 @@ Variants { // Left side of bar RowLayout { spacing: 15 + Layout.fillWidth: true Layout.fillHeight: true Layout.alignment: Qt.AlignLeft Workspaces { screen: root.screen Layout.fillHeight: true + Layout.preferredWidth: height } - ActiveWindow { - id: activeWindow - Layout.preferredWidth: 400 - } + // ActiveWindow { + // id: activeWindow + // Layout.preferredWidth: 400 + // } } // PowerMenu { diff --git a/shell/bar/Workspaces.qml b/shell/bar/Workspaces.qml index ab14fa9..53e8326 100644 --- a/shell/bar/Workspaces.qml +++ b/shell/bar/Workspaces.qml @@ -6,7 +6,7 @@ import qs RowLayout { spacing: 6 - visible: Hyprland.monitors.values.length != 0 + visible: Hyprland.workspaces.values.some(ws => ws.monitor === Hyprland.monitorFor(screen)) required property var screen diff --git a/shell/volume-osd/Controller.qml b/shell/volume-osd/Controller.qml index b381574..5e6bd3e 100644 --- a/shell/volume-osd/Controller.qml +++ b/shell/volume-osd/Controller.qml @@ -6,7 +6,8 @@ import Qt5Compat.GraphicalEffects import Quickshell import Quickshell.Widgets import Quickshell.Services.Pipewire -import ".." +import qs +import qs.widgets Scope { id: root @@ -20,6 +21,7 @@ Scope { target: Pipewire.defaultAudioSink?.audio function onVolumeChanged() { + console.log("Volume Changed, showing OSD."); root.shouldShowOsd = true; hideTimer.restart(); } @@ -36,21 +38,19 @@ Scope { LazyLoader { active: root.shouldShowOsd - PopupWindow { - implicitWidth: 50 - implicitHeight: 275 + PanelWindow { + implicitWidth: 250 + implicitHeight: 50 color: "transparent" - - // An empty click mask prevents the window from blocking mouse events. + exclusiveZone: 0 + visible: true mask: Region {} + anchors.bottom: true + margins.bottom: screen.height / 10 - Rectangle { + StyledRectangle { anchors.fill: parent - radius: 8 - color: { - let color = ShellSettings.colors["surface"]; - return Qt.rgba(color.r, color.g, color.b, 0.8); - } + // radius: 8 RowLayout { anchors { @@ -69,10 +69,7 @@ Scope { Layout.fillWidth: true implicitHeight: 10 radius: 20 - color: { - let color = ShellSettings.colors["inverse_surface"]; - return Qt.rgba(color.r, color.g, color.b, 0.5); - } + color: ShellSettings.colors.inactive layer.enabled: true layer.effect: OpacityMask { @@ -85,7 +82,7 @@ Scope { } Rectangle { - color: ShellSettings.colors["primary"] + color: ShellSettings.colors.active anchors { left: parent.left top: parent.top