Commit 15110e1d authored by Fushan Wen's avatar Fushan Wen Committed by Nate Graham
Browse files

desktoppackage: warn on cancel if there are unsaved settings

When single click to preview wallpaper is enabled, it has the potential
of confusing users. When they click on the image they might think the
image is already applied and just close the window without hitting "apply".
This could be solved if a window popped up asking users to apply if
they try to close the window before applying, just like System Settings does.

CCBUG: 403384
parent ce73c50c
Pipeline #184551 passed with stage
in 4 minutes and 51 seconds
......@@ -274,10 +274,14 @@ Rectangle {
standardButtons: StandardButton.Apply | StandardButton.Discard | StandardButton.Cancel
onApply: {
onDiscard: {
if (item) {;
} else {
......@@ -350,7 +354,15 @@ Rectangle {
QQC2.Action {
id: cancelAction
onTriggered: configDialog.close();
onTriggered: {
if (applyButton.enabled) {
messageDialog.item = null;;
shortcut: "Escape"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment