brightness osd: fix screen change connection target

This commit is contained in:
end-4
2025-05-18 00:27:14 +02:00
parent 27ca14d208
commit 853622e05e
@@ -12,7 +12,7 @@ import Quickshell.Wayland
Scope { Scope {
id: root id: root
property bool showOsdValues: false property bool showOsdValues: false
property var focusedScreen: Quickshell.screens.find(s => s.name === Hyprland.focusedMonitor?.name) property ShellScreen focusedScreen: Quickshell.screens.find(s => s.name === Hyprland.focusedMonitor?.name)
property var brightnessMonitor: Brightness.getMonitorForScreen(focusedScreen) property var brightnessMonitor: Brightness.getMonitorForScreen(focusedScreen)
function triggerOsd() { function triggerOsd() {
@@ -55,7 +55,7 @@ Scope {
id: osdRoot id: osdRoot
Connections { Connections {
target: osdLoader target: root
function onFocusedScreenChanged() { function onFocusedScreenChanged() {
osdRoot.screen = root.focusedScreen osdRoot.screen = root.focusedScreen
} }
@@ -66,9 +66,7 @@ Scope {
WlrLayershell.layer: WlrLayer.Overlay WlrLayershell.layer: WlrLayer.Overlay
color: "transparent" color: "transparent"
anchors { anchors.top: true
top: true
}
mask: Region { mask: Region {
item: osdValuesWrapper item: osdValuesWrapper
} }