intermediary changes, plan to revert to mousearea for gestures + config load bugfixes

This commit is contained in:
2026-09-30 14:23:46 +02:00
parent f825e4d53b
commit 0bfda04e91
12 changed files with 351 additions and 45 deletions
+27 -23
View File
@@ -87,15 +87,27 @@ Item {
if (root.singleGestureTriggered)
return;
// if (root.geometry.insetTop(root.borderThickness) > pressY) {
// if (dragY > 20) {
// root.screenState.settings = true;
// root.singleGestureTriggered = true;
// } else if (dragY < -20) {
// root.screenState.settings = false;
// root.singleGestureTriggered = true;
// }
// }
const inDashboard = root.inTopPanel(root.panels.dashboardWrapper, pressX, pressY);
if (inDashboard && root.withinPanelWidth(root.panels.dashboardWrapper, x, y)) {
if (dragY > Config.dashboard.dragThreshold) {
root.screenState.dashboard = true;
root.singleGestureTriggered = true;
} else if (dragY < -Config.dashboard.dragThreshold) {
root.screenState.dashboard = false;
root.singleGestureTriggered = true;
}
}
if (root.geometry.insetTop(root.borderThickness) > pressY && (Config.dashboard.showOnHover || !inDashboard)) {
if (dragY > 20) {
root.screenState.settings = true;
root.singleGestureTriggered = true;
} else if (dragY < -20) {
root.screenState.settings = false;
root.singleGestureTriggered = true;
}
}
if (pressY > root.screen.height - root.geometry.insetBottom(root.borderThickness) && pressX < root.screen.width / 5 && dragY < -50)
root.screenState.clipboard = true;
@@ -120,16 +132,6 @@ Item {
Hypr.dispatch(`hl.dsp.focus({ workspace = 'r-1', on_current_monitor = true })`);
root.singleGestureTriggered = true;
}
if (root.inTopPanel(root.panels.dashboardWrapper, pressX, pressY) && root.withinPanelWidth(root.panels.dashboardWrapper, x, y)) {
if (dragY > Config.dashboard.dragThreshold) {
root.screenState.dashboard = true;
root.singleGestureTriggered = true;
} else if (dragY < -Config.dashboard.dragThreshold) {
root.screenState.dashboard = false;
root.singleGestureTriggered = true;
}
}
}
}
@@ -276,6 +278,7 @@ Item {
root.screenState.settings = false;
root.screenState.sidebar = false;
root.screenState.resources = false;
root.popouts.hasCurrent = false;
} else {
root.dashboardShortcutActive = false;
@@ -323,12 +326,13 @@ Item {
}
function onResourcesChanged() {
if (root.screenState.resources && (root.popouts.currentName.startsWith("audio") || root.popouts.currentName.startsWith("updates"))) {
root.popouts.hasCurrent = false;
}
if (root.screenState.resources) {
if (root.popouts.currentName.startsWith("audio") || root.popouts.currentName.startsWith("updates"))
root.popouts.hasCurrent = false;
if (root.screenState.resources)
root.screenState.settings = false;
root.screenState.dashboard = false;
}
}
function onSettingsChanged() {