From 6e6db08726e3bc274594de6835a01fc10002def9 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 17 May 2025 00:44:00 +0800 Subject: feat: dashboard --- modules/drawers/Interactions.qml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/drawers/Interactions.qml') diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml index e937326..0dfda50 100644 --- a/modules/drawers/Interactions.qml +++ b/modules/drawers/Interactions.qml @@ -21,6 +21,10 @@ MouseArea { function inRightPanel(panel: Item, x: real, y: real): bool { return x > BorderConfig.thickness + panel.x && withinPanelHeight(panel, x, y); } + + function inTopPanel(panel: Item, x: real, y: real): bool { + const panelX = BorderConfig.thickness + panel.x; + return y < BorderConfig.thickness + panel.y + panel.height && x >= panelX && x <= panelX + panel.width; } anchors.fill: parent @@ -50,6 +54,9 @@ MouseArea { else if (dragX > SessionConfig.dragThreshold) root.visibilities.session = false; } + + const showDashboard = root.inTopPanel(panels.dashboard, x, y); + root.visibilities.dashboard = showDashboard; } } -- cgit v1.2.3-freya