summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/LauncherConfig.qml1
-rw-r--r--modules/drawers/Interactions.qml11
2 files changed, 11 insertions, 1 deletions
diff --git a/config/LauncherConfig.qml b/config/LauncherConfig.qml
index ea3c364..081d068 100644
--- a/config/LauncherConfig.qml
+++ b/config/LauncherConfig.qml
@@ -5,6 +5,7 @@ JsonObject {
property int maxWallpapers: 9 // Warning: even numbers look bad
property string actionPrefix: ">"
property bool enableDangerousActions: false // Allow actions that can cause losing data, like shutdown, reboot and logout
+ property int dragThreshold: 50
property JsonObject sizes: JsonObject {
property int itemWidth: 600
diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml
index b3e717a..0a00219 100644
--- a/modules/drawers/Interactions.qml
+++ b/modules/drawers/Interactions.qml
@@ -81,7 +81,7 @@ MouseArea {
}
// Show/hide session on drag
- if (pressed && withinPanelHeight(panels.session, x, y)) {
+ if (pressed && inRightPanel(panels.session, dragStart.x, dragStart.y) && withinPanelHeight(panels.session, x, y)) {
const dragX = x - dragStart.x;
if (dragX < -Config.session.dragThreshold)
visibilities.session = true;
@@ -89,6 +89,15 @@ MouseArea {
visibilities.session = false;
}
+ // Show/hide launcher on drag
+ if (pressed && inBottomPanel(panels.launcher, dragStart.x, dragStart.y) && withinPanelWidth(panels.launcher, x, y)) {
+ const dragY = y - dragStart.y;
+ if (dragY < -Config.launcher.dragThreshold)
+ visibilities.launcher = true;
+ else if (dragY > Config.launcher.dragThreshold)
+ visibilities.launcher = false;
+ }
+
// Show dashboard on hover
const showDashboard = inTopPanel(panels.dashboard, x, y);