osd attached to triggering module position, per-screen filtering

This commit is contained in:
Damocles 2026-04-12 17:57:12 +02:00
parent 85a1260a35
commit 66dc628752
4 changed files with 19 additions and 6 deletions

View file

@ -13,7 +13,7 @@ PanelWindow {
color: "transparent"
property bool _winVisible: false
property bool _shown: M.OsdState.visible
property bool _shown: M.OsdState.visible && M.OsdState.screen === root.screen
on_ShownChanged: {
if (_shown) {
@ -35,7 +35,10 @@ PanelWindow {
anchors.left: true
margins.top: 0
margins.left: Math.round((screen.width - implicitWidth) / 2)
margins.left: Math.max(0, Math.min(
Math.round(M.OsdState.itemX - implicitWidth / 2),
screen.width - implicitWidth
))
implicitWidth: 200
implicitHeight: 48