From 137fd56bb28aafb6973194208e2b0346367a10fe Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 5 May 2025 20:21:56 +1000 Subject: feat: show osd on border hover --- modules/osd/Osd.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'modules/osd') diff --git a/modules/osd/Osd.qml b/modules/osd/Osd.qml index 009eb2f..f16b396 100644 --- a/modules/osd/Osd.qml +++ b/modules/osd/Osd.qml @@ -12,6 +12,7 @@ Variants { required property ShellScreen modelData readonly property Brightness.Monitor monitor: Brightness.getMonitorForScreen(modelData) + property int winHeight property bool osdVisible property bool hovered @@ -50,6 +51,15 @@ Variants { } } + Connections { + target: Drawers + + function onPosChanged(screen: ShellScreen, x: int, y: int): void { + if (screen === root.modelData && x > screen.width / 2 && y > (screen.height - root.winHeight) / 2 && y < (screen.height + root.winHeight) / 2) + root.show(); + } + } + LazyLoader { loading: true @@ -68,6 +78,8 @@ Variants { anchors.right: true height: wrapper.height + Component.onCompleted: root.winHeight = height + Background { id: bg -- cgit v1.2.3-freya