summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoramane <61896496+soramanew@users.noreply.github.com>2025-07-26 14:40:48 +1000
committerSoramane <61896496+soramanew@users.noreply.github.com>2025-07-26 14:40:48 +1000
commit790e1a30ccf83a40fbf3aedbab92b5ba8052f456 (patch)
tree0d34aaf792e53b3d1eb631f86e98b4421c1328c5
parentconfig: allow enable/disable panels (diff)
downloadcaelestia-shell-790e1a30ccf83a40fbf3aedbab92b5ba8052f456.tar.gz
caelestia-shell-790e1a30ccf83a40fbf3aedbab92b5ba8052f456.tar.bz2
caelestia-shell-790e1a30ccf83a40fbf3aedbab92b5ba8052f456.zip
dashboard: show on hover (for touch devices)
-rw-r--r--config/DashboardConfig.qml1
-rw-r--r--modules/drawers/Interactions.qml9
2 files changed, 10 insertions, 0 deletions
diff --git a/config/DashboardConfig.qml b/config/DashboardConfig.qml
index 28e3b66..b6388e5 100644
--- a/config/DashboardConfig.qml
+++ b/config/DashboardConfig.qml
@@ -4,6 +4,7 @@ JsonObject {
property bool enabled: true
property int mediaUpdateInterval: 500
property int visualiserBars: 45
+ property int dragThreshold: 50
property Sizes sizes: Sizes {}
component Sizes: JsonObject {
diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml
index 6640d22..7eeccf1 100644
--- a/modules/drawers/Interactions.qml
+++ b/modules/drawers/Interactions.qml
@@ -127,6 +127,15 @@ MouseArea {
dashboardShortcutActive = false;
}
+ // Show/hide dashboard on drag (for touchscreen devices)
+ if (pressed && inTopPanel(panels.dashboard, dragStart.x, dragStart.y) && withinPanelWidth(panels.dashboard, x, y)) {
+ const dragY = y - dragStart.y;
+ if (dragY > Config.dashboard.dragThreshold)
+ visibilities.dashboard = true;
+ else if (dragY < -Config.dashboard.dragThreshold)
+ visibilities.dashboard = false;
+ }
+
// Show utilities on hover
const showUtilities = inBottomPanel(panels.utilities, x, y);