aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-07 12:38:18 +0100
committerDanilo M. <danix@danix.xyz>2026-11-07 12:38:18 +0100
commit3d045076d49ee7cc074f670806a823099ea9fb09 (patch)
tree32760f1d5075ad14adc67c182f0df883c9a13e53 /desktop/modules
parentaf008cbd9f5d8d03eff0aa8ac1c7856bb30412e0 (diff)
downloadquickshell-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')
-rw-r--r--desktop/modules/sonix/BootlogoModule.qml2
-rw-r--r--desktop/modules/sonix/BootlogoTab.qml15
2 files changed, 4 insertions, 13 deletions
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