mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +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() {
|
||||
applyButton.enabled = true;
|
||||
if (main.currentItem.saveConfig !== undefined) {
|
||||
main.currentItem.saveConfig();
|
||||
} else {
|
||||
root.saveConfig();
|
||||
}
|
||||
}
|
||||
//END functions
|
||||
|
||||
|
|
@ -221,7 +225,6 @@ Rectangle {
|
|||
if (currentItem["configurationChanged"]) {
|
||||
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.
|
||||
* root.pageChanged will start a timer, that in turn will call saveConfig() when triggered
|
||||
|
|
@ -308,21 +311,10 @@ Rectangle {
|
|||
RowLayout {
|
||||
id: buttonsRow
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
|
||||
QtControls.Button {
|
||||
iconName: "dialog-ok"
|
||||
text: i18nd("plasma_shell_org.kde.plasma.desktop", "OK")
|
||||
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")
|
||||
iconName: "window-close"
|
||||
text: i18nd("plasma_shell_org.kde.plasma.desktop", "Close")
|
||||
onClicked: cancelAction.trigger()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,5 +81,6 @@ ColumnLayout {
|
|||
break;
|
||||
}
|
||||
}
|
||||
root.restoreConfig()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue