[kcmkwin/kwindesktop] Add explicit action to apply a rename
The rnew name is applied when the user hits the return or enter key to finish renaming, but this is an invisible UI and the user might not think to do that. This commit replaces the "Rename" button with a "Confirm new name" button while the text field is editable, so that it's visibly clear how to finish renaming.
This commit is contained in:
parent
324480570b
commit
20b8d606e1
1 changed files with 10 additions and 0 deletions
|
@ -85,6 +85,7 @@ KCM.ScrollViewKCM {
|
|||
Kirigami.Action {
|
||||
id: renameAction
|
||||
enabled: model && !model.IsMissing
|
||||
visible: !applyAction.visible
|
||||
iconName: "edit-rename"
|
||||
tooltip: i18nc("@info:tooltip", "Rename")
|
||||
onTriggered: {
|
||||
|
@ -93,6 +94,15 @@ KCM.ScrollViewKCM {
|
|||
nameField.forceActiveFocus();
|
||||
}
|
||||
},
|
||||
Kirigami.Action {
|
||||
id: applyAction
|
||||
visible: !nameField.readOnly
|
||||
iconName: "dialog-ok-apply"
|
||||
tooltip: i18nc("@info:tooltip", "Confirm new name")
|
||||
onTriggered: {
|
||||
nameField.readOnly = true;
|
||||
}
|
||||
},
|
||||
Kirigami.Action {
|
||||
enabled: model && !model.IsMissing && desktopsList.count !== 1
|
||||
iconName: "edit-delete"
|
||||
|
|
Loading…
Reference in a new issue