From 3d045076d49ee7cc074f670806a823099ea9fb09 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 7 Nov 2026 12:38:18 +0100 Subject: settings: one snackbar for every page's messages Save, apply and upload results went to the page header, one line capped at 420px and cut with an ellipsis. They now go to a snackbar at the foot of the settings window, wrapped in full: green fades after 6s, yellow and red stay until dismissed or replaced, and changing page clears it. Snack.qml is the singleton pages call (ok, wait, error); Snackbar.qml draws it once in Settings.qml. SaveBar forwards its notice and error, so the 24 pages using it change nothing; the header keeps only the draft's state. The boot logo page calls Snack directly. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/sonix/BootlogoModule.qml | 2 +- desktop/modules/sonix/BootlogoTab.qml | 15 +++------------ 2 files changed, 4 insertions(+), 13 deletions(-) (limited to 'desktop/modules') diff --git a/desktop/modules/sonix/BootlogoModule.qml b/desktop/modules/sonix/BootlogoModule.qml index 8778ce3..ea39376 100644 --- a/desktop/modules/sonix/BootlogoModule.qml +++ b/desktop/modules/sonix/BootlogoModule.qml @@ -28,7 +28,7 @@ Module { actions: Component { Row { spacing: 8 - // The status is in the page, under Output, where it wraps. + // Results go to the window's snackbar (Snack.qml). Button { text: tab.busy ? "Busy…" : "Save" enabled: tab.canSave diff --git a/desktop/modules/sonix/BootlogoTab.qml b/desktop/modules/sonix/BootlogoTab.qml index 4a34dc7..96454a2 100644 --- a/desktop/modules/sonix/BootlogoTab.qml +++ b/desktop/modules/sonix/BootlogoTab.qml @@ -37,10 +37,10 @@ Row { property bool busy: false property bool waiting: false - property string status: "" - property bool statusError: false readonly property bool canSave: canvas.ready && !tab.busy - function say(t, err) { tab.status = t; tab.statusError = !!err; } + // To the window's snackbar (Snack.qml): yellow while waiting for Wi-Fi + // transfer, red on failure, green otherwise. + function say(t, err) { if (tab.waiting) Snack.wait(t); else if (err) Snack.error(t); else Snack.ok(t); } readonly property var swatches: ["#ffffff", "#000000", "#3584e4", "#ff7800", "#e5a50a", "#2ec27e", "#9141ac", "#d56199", "udt"] @@ -319,15 +319,6 @@ Row { enabled: Sonix.present && !tab.busy && !tab.waiting onClicked: pickSaved.open() } - // Save and upload results, in full: the header has no room for them. - Text { - visible: tab.status !== "" - width: parent.width - wrapMode: Text.Wrap - text: tab.status - font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 3 } - color: tab.waiting ? Theme.yellow : tab.statusError ? Theme.red : Theme.green - } Text { width: parent.width wrapMode: Text.Wrap -- cgit v1.2.3