summaryrefslogtreecommitdiff
path: root/modules/drawers/Interactions.qml
diff options
context:
space:
mode:
authorTim Hämisch <tim@thaemisch.net>2025-06-15 13:40:47 +0200
committerGitHub <noreply@github.com>2025-06-15 13:40:47 +0200
commit68874082b4cfee63feaecc0640646ad0ba753da7 (patch)
tree815a1113a4bd83373283253a35f0220a08a8cfe6 /modules/drawers/Interactions.qml
parentlauncher: use standard logout command (diff)
parentdashboard: fix uptime (diff)
downloadcaelestia-shell-68874082b4cfee63feaecc0640646ad0ba753da7.tar.gz
caelestia-shell-68874082b4cfee63feaecc0640646ad0ba753da7.tar.bz2
caelestia-shell-68874082b4cfee63feaecc0640646ad0ba753da7.zip
Merge branch 'main' into betteractions
Diffstat (limited to 'modules/drawers/Interactions.qml')
-rw-r--r--modules/drawers/Interactions.qml15
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml
index 10e37a8..d38cc8a 100644
--- a/modules/drawers/Interactions.qml
+++ b/modules/drawers/Interactions.qml
@@ -20,8 +20,8 @@ MouseArea {
property bool osdShortcutActive
function withinPanelHeight(panel: Item, x: real, y: real): bool {
- const panelY = BorderConfig.thickness + panel.y;
- return y >= panelY - BorderConfig.rounding && y <= panelY + panel.height + BorderConfig.rounding;
+ const panelY = Config.border.thickness + panel.y;
+ return y >= panelY - Config.border.rounding && y <= panelY + panel.height + Config.border.rounding;
}
function inRightPanel(panel: Item, x: real, y: real): bool {
@@ -30,7 +30,7 @@ MouseArea {
function inTopPanel(panel: Item, x: real, y: real): bool {
const panelX = bar.implicitWidth + panel.x;
- return y < BorderConfig.thickness + panel.y + panel.height && x >= panelX - BorderConfig.rounding && x <= panelX + panel.width + BorderConfig.rounding;
+ return y < Config.border.thickness + panel.y + panel.height && x >= panelX - Config.border.rounding && x <= panelX + panel.width + Config.border.rounding;
}
anchors.fill: parent
@@ -51,7 +51,10 @@ MouseArea {
}
}
- onPositionChanged: ({x, y}) => {
+ onPositionChanged: ({
+ x,
+ y
+ }) => {
// Show osd on hover
const showOsd = inRightPanel(panels.osd, x, y);
@@ -68,9 +71,9 @@ MouseArea {
// Show/hide session on drag
if (pressed && withinPanelHeight(panels.session, x, y)) {
const dragX = x - dragStart.x;
- if (dragX < -SessionConfig.dragThreshold)
+ if (dragX < -Config.session.dragThreshold)
visibilities.session = true;
- else if (dragX > SessionConfig.dragThreshold)
+ else if (dragX > Config.session.dragThreshold)
visibilities.session = false;
}