mirror of
https://github.com/kossLAN/dots.git
synced 2025-11-04 22:49:50 -05:00
fix: volume-osd popup
This commit is contained in:
parent
29658fa910
commit
c48aca3d0c
3 changed files with 21 additions and 22 deletions
|
|
@ -40,18 +40,20 @@ Variants {
|
||||||
// Left side of bar
|
// Left side of bar
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 15
|
spacing: 15
|
||||||
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.alignment: Qt.AlignLeft
|
Layout.alignment: Qt.AlignLeft
|
||||||
|
|
||||||
Workspaces {
|
Workspaces {
|
||||||
screen: root.screen
|
screen: root.screen
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
Layout.preferredWidth: height
|
||||||
}
|
}
|
||||||
|
|
||||||
ActiveWindow {
|
// ActiveWindow {
|
||||||
id: activeWindow
|
// id: activeWindow
|
||||||
Layout.preferredWidth: 400
|
// Layout.preferredWidth: 400
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// PowerMenu {
|
// PowerMenu {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import qs
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 6
|
spacing: 6
|
||||||
visible: Hyprland.monitors.values.length != 0
|
visible: Hyprland.workspaces.values.some(ws => ws.monitor === Hyprland.monitorFor(screen))
|
||||||
|
|
||||||
required property var screen
|
required property var screen
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,8 @@ import Qt5Compat.GraphicalEffects
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
import Quickshell.Services.Pipewire
|
import Quickshell.Services.Pipewire
|
||||||
import ".."
|
import qs
|
||||||
|
import qs.widgets
|
||||||
|
|
||||||
Scope {
|
Scope {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -20,6 +21,7 @@ Scope {
|
||||||
target: Pipewire.defaultAudioSink?.audio
|
target: Pipewire.defaultAudioSink?.audio
|
||||||
|
|
||||||
function onVolumeChanged() {
|
function onVolumeChanged() {
|
||||||
|
console.log("Volume Changed, showing OSD.");
|
||||||
root.shouldShowOsd = true;
|
root.shouldShowOsd = true;
|
||||||
hideTimer.restart();
|
hideTimer.restart();
|
||||||
}
|
}
|
||||||
|
|
@ -36,21 +38,19 @@ Scope {
|
||||||
LazyLoader {
|
LazyLoader {
|
||||||
active: root.shouldShowOsd
|
active: root.shouldShowOsd
|
||||||
|
|
||||||
PopupWindow {
|
PanelWindow {
|
||||||
implicitWidth: 50
|
implicitWidth: 250
|
||||||
implicitHeight: 275
|
implicitHeight: 50
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
exclusiveZone: 0
|
||||||
// An empty click mask prevents the window from blocking mouse events.
|
visible: true
|
||||||
mask: Region {}
|
mask: Region {}
|
||||||
|
anchors.bottom: true
|
||||||
|
margins.bottom: screen.height / 10
|
||||||
|
|
||||||
Rectangle {
|
StyledRectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: 8
|
// radius: 8
|
||||||
color: {
|
|
||||||
let color = ShellSettings.colors["surface"];
|
|
||||||
return Qt.rgba(color.r, color.g, color.b, 0.8);
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors {
|
anchors {
|
||||||
|
|
@ -69,10 +69,7 @@ Scope {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
implicitHeight: 10
|
implicitHeight: 10
|
||||||
radius: 20
|
radius: 20
|
||||||
color: {
|
color: ShellSettings.colors.inactive
|
||||||
let color = ShellSettings.colors["inverse_surface"];
|
|
||||||
return Qt.rgba(color.r, color.g, color.b, 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: OpacityMask {
|
layer.effect: OpacityMask {
|
||||||
|
|
@ -85,7 +82,7 @@ Scope {
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: ShellSettings.colors["primary"]
|
color: ShellSettings.colors.active
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
top: parent.top
|
top: parent.top
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue