aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/Drawer.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/Drawer.qml')
-rw-r--r--desktop/Drawer.qml16
1 files changed, 9 insertions, 7 deletions
diff --git a/desktop/Drawer.qml b/desktop/Drawer.qml
index 27b90fc..7855823 100644
--- a/desktop/Drawer.qml
+++ b/desktop/Drawer.qml
@@ -69,11 +69,12 @@ Scope {
root.open = true;
}
- // One step out: history, then a page, then the drawer itself. Escape
- // and the mouse's back button.
+ // 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
+ // a page's back arrow.
function back() {
if (root.history) root.history = false;
- else if (root.page) root.page = "";
+ else if (root.page) root.page = root.current?.up ?? "";
else root.close();
}
@@ -238,12 +239,13 @@ Scope {
active: root.current !== null
sourceComponent: root.current?.page ?? null
- // The Page's back arrow returns to the grid. Without this
- // the header button is inert, since the page only emits
- // `back` and does not know who hosts it.
+ // The Page's back arrow steps out as Escape does. Without
+ // this the header button is inert, since the page only
+ // emits `back` and does not know who hosts it.
onLoaded: {
- if (item && item.back) item.back.connect(() => root.page = "");
+ if (item && item.back) item.back.connect(root.back);
if (item && item.dismiss) item.dismiss.connect(root.close);
+ if (item && item.go) item.go.connect(root.show);
}
// The page header shows the module's tile glyph. A Binding,