aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/SaveBar.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/SaveBar.qml')
-rw-r--r--desktop/SaveBar.qml24
1 files changed, 12 insertions, 12 deletions
diff --git a/desktop/SaveBar.qml b/desktop/SaveBar.qml
index 147d00b..239b896 100644
--- a/desktop/SaveBar.qml
+++ b/desktop/SaveBar.qml
@@ -18,10 +18,11 @@ import QtQuick
// does (Apply and Reset for a staged wallpaper or cursor, Save + Restart for
// a daemon that rereads only at start); busy shows while a save runs.
//
-// The outcome of a save is reported here too, not at the foot of the page:
-// notice is what a finished save says ("saved"), shown once the page is
-// clean, in noticeColor; error is a save refused or failed, which leaves the
-// draft dirty, so it is shown over "unsaved changes", in red.
+// The outcome of a save goes to the window's snackbar (Snack.qml), where it
+// is shown in full: notice is what a finished save says ("saved"), in
+// noticeColor, fading by itself; error is a save refused or failed, in red,
+// staying until dismissed. Only the draft's state stays here, beside the
+// buttons: "unsaved changes", or what is wrong when Save is held back.
Row {
id: bar
property bool dirty: false
@@ -37,18 +38,17 @@ Row {
signal discard
spacing: 8
+ onNoticeChanged: if (bar.notice !== "") Snack.show(bar.notice, bar.noticeColor, false)
+ onErrorChanged: if (bar.error !== "") Snack.error(bar.error)
+
Text {
anchors.verticalCenter: parent.verticalCenter
- visible: bar.error !== "" || bar.dirty || bar.notice !== ""
- // ponytail: a long message elides; the header has one line.
+ visible: bar.dirty
+ // ponytail: a long note elides; the header has one line.
width: Math.min(implicitWidth, 420)
elide: Text.ElideRight
- text: bar.error !== "" ? bar.error
- : !bar.dirty ? bar.notice
- : !bar.valid ? (bar.note || "fix the fields marked red") : "unsaved changes"
- color: bar.error !== "" ? Theme.red
- : !bar.dirty ? bar.noticeColor
- : bar.valid ? Theme.yellow : Theme.red
+ text: !bar.valid ? (bar.note || "fix the fields marked red") : "unsaved changes"
+ color: bar.valid ? Theme.yellow : Theme.red
font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 }
}
Button {