diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-07 12:38:18 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-07 12:38:18 +0100 |
| commit | 3d045076d49ee7cc074f670806a823099ea9fb09 (patch) | |
| tree | 32760f1d5075ad14adc67c182f0df883c9a13e53 /desktop/modules/sonix/BootlogoTab.qml | |
| parent | af008cbd9f5d8d03eff0aa8ac1c7856bb30412e0 (diff) | |
| download | quickshell-3d045076d49ee7cc074f670806a823099ea9fb09.tar.gz quickshell-3d045076d49ee7cc074f670806a823099ea9fb09.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/sonix/BootlogoTab.qml')
| -rw-r--r-- | desktop/modules/sonix/BootlogoTab.qml | 15 |
1 files changed, 3 insertions, 12 deletions
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 |
