diff --git a/config/DashboardConfig.qml b/config/DashboardConfig.qml index 28e3b66b..b6388e56 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 6640d223..7eeccf10 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);