mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 01:34:46 +00:00
instant apply
This commit is contained in:
parent
87f8ef61b7
commit
ee4defd92f
2 changed files with 9 additions and 16 deletions
|
|
@ -91,7 +91,11 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
function settingValueChanged() {
|
function settingValueChanged() {
|
||||||
applyButton.enabled = true;
|
if (main.currentItem.saveConfig !== undefined) {
|
||||||
|
main.currentItem.saveConfig();
|
||||||
|
} else {
|
||||||
|
root.saveConfig();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//END functions
|
//END functions
|
||||||
|
|
||||||
|
|
@ -221,7 +225,6 @@ Rectangle {
|
||||||
if (currentItem["configurationChanged"]) {
|
if (currentItem["configurationChanged"]) {
|
||||||
currentItem["configurationChanged"].connect(root.settingValueChanged)
|
currentItem["configurationChanged"].connect(root.settingValueChanged)
|
||||||
}
|
}
|
||||||
applyButton.enabled = false;
|
|
||||||
/*
|
/*
|
||||||
* This is not needed on a desktop shell that has ok/apply/cancel buttons, i'll leave it here only for future reference until we have a prototype for the active shell.
|
* This is not needed on a desktop shell that has ok/apply/cancel buttons, i'll leave it here only for future reference until we have a prototype for the active shell.
|
||||||
* root.pageChanged will start a timer, that in turn will call saveConfig() when triggered
|
* root.pageChanged will start a timer, that in turn will call saveConfig() when triggered
|
||||||
|
|
@ -308,21 +311,10 @@ Rectangle {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: buttonsRow
|
id: buttonsRow
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||||
|
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
iconName: "dialog-ok"
|
iconName: "window-close"
|
||||||
text: i18nd("plasma_shell_org.kde.plasma.desktop", "OK")
|
text: i18nd("plasma_shell_org.kde.plasma.desktop", "Close")
|
||||||
onClicked: acceptAction.trigger()
|
|
||||||
}
|
|
||||||
QtControls.Button {
|
|
||||||
id: applyButton
|
|
||||||
enabled: false
|
|
||||||
iconName: "dialog-ok-apply"
|
|
||||||
text: i18nd("plasma_shell_org.kde.plasma.desktop", "Apply")
|
|
||||||
onClicked: applyAction.trigger()
|
|
||||||
}
|
|
||||||
QtControls.Button {
|
|
||||||
iconName: "dialog-cancel"
|
|
||||||
text: i18nd("plasma_shell_org.kde.plasma.desktop", "Cancel")
|
|
||||||
onClicked: cancelAction.trigger()
|
onClicked: cancelAction.trigger()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,5 +81,6 @@ ColumnLayout {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
root.restoreConfig()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue