summaryrefslogtreecommitdiff
path: root/modules/drawers/Interactions.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-13 17:06:21 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-13 17:06:21 +1000
commit1656e5c3556fafd388510cd6728e064c802d9e25 (patch)
tree701523457f71370a97ec952f2fd75e2ef266a4be /modules/drawers/Interactions.qml
parentrefactor: move to single window (diff)
downloadcaelestia-shell-1656e5c3556fafd388510cd6728e064c802d9e25.tar.gz
caelestia-shell-1656e5c3556fafd388510cd6728e064c802d9e25.tar.bz2
caelestia-shell-1656e5c3556fafd388510cd6728e064c802d9e25.zip
osd: show on hover
Diffstat (limited to 'modules/drawers/Interactions.qml')
-rw-r--r--modules/drawers/Interactions.qml15
1 files changed, 13 insertions, 2 deletions
diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml
index 5006a96..aab23aa 100644
--- a/modules/drawers/Interactions.qml
+++ b/modules/drawers/Interactions.qml
@@ -1,11 +1,22 @@
import "root:/services"
+import "root:/config"
import Quickshell
import QtQuick
MouseArea {
- required property ShellScreen screen
+ required property PersistentProperties visibilities
+
+ property point dragStart
anchors.fill: parent
hoverEnabled: true
- onPositionChanged: event => Drawers.setPosForScreen(screen, event.x, event.y)
+
+ onPressed: event => dragStart = Qt.point(event.x, event.y)
+ onExited: visibilities.osd = false
+
+ onPositionChanged: ({x, y}) => {
+ // Show osd on hover
+ const osd = panels.osd;
+ visibilities.osd = (x > width - BorderConfig.thickness - osd.width && y >= osd.y && y <= osd.y + osd.height);
+ }
}