From d83b1fb7b1336389d7965af75a88912ff2fafbb8 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 17 Oct 2026 09:55:26 +0200 Subject: desktop: git config moves to the settings window The global git config is set once and left alone, which is what the settings window is for. The user row and its page stay in the drawer; "More git settings" there now closes the drawer and opens git in the window: Drawer.show hands any settings module to the window, so every deep link, IPC included, lands in the right place. Git was the only user of Module.up, the page back() returned to, so up goes with it and back from a drawer page is always the grid. Also gives autostart its rocket glyph, which the first commit wrote as an empty string. Co-Authored-By: Claude Opus 5.5 --- desktop/Drawer.qml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'desktop/Drawer.qml') diff --git a/desktop/Drawer.qml b/desktop/Drawer.qml index 7855823..2151547 100644 --- a/desktop/Drawer.qml +++ b/desktop/Drawer.qml @@ -21,6 +21,11 @@ Scope { // The modules the drawer hosts, in grid order. Set from shell.qml. property list modules + // The settings window, set from shell.qml. A page that lives there is + // handed to it rather than shown here (the user page opens git). + // Not named `settings`, shell.qml's id for it (it would bind to itself). + property var settingsWindow: null + // Waybar runs on this screen and the launcher sits at its left end, so // the drawer belongs here. Falls back to the first screen when this // monitor is not connected, so the drawer is never invisible. @@ -62,6 +67,11 @@ Scope { } function show(name) { + if (root.settingsWindow && root.modules.some(m => m.name === name && m.settings)) { + root.close(); + root.settingsWindow.show(name); + return; + } // Deep-linking to a page must leave the history view, or both loaders // stay active and the later-declared history loader paints on top. root.history = false; @@ -69,12 +79,12 @@ Scope { root.open = true; } - // One step out: history, then a page (to its module's `up`, the grid by - // default), then the drawer itself. Escape, the mouse's back button and + // One step out: history, then a page (to the grid), then the drawer + // itself. Escape, the mouse's back button and // a page's back arrow. function back() { if (root.history) root.history = false; - else if (root.page) root.page = root.current?.up ?? ""; + else if (root.page) root.page = ""; else root.close(); } -- cgit v1.2.3