[kcmkwin/kwindesktop] Allow renaming desktops with double-click
Similar to the feature to allow inline renaming in file managers, you can now trigger renaming for a desktop by double-clicking on its list item. BUG: 421882 FIXED-IN: 5.23
This commit is contained in:
parent
644dcbe173
commit
324480570b
1 changed files with 11 additions and 2 deletions
|
@ -46,10 +46,10 @@ KCM.ScrollViewKCM {
|
|||
bottomPadding: 0
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.fillHeight: true
|
||||
|
||||
text: model ? model.display : ""
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
readOnly: true
|
||||
|
||||
|
@ -60,6 +60,14 @@ KCM.ScrollViewKCM {
|
|||
onEditingFinished: {
|
||||
readOnly = true;
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
||||
onDoubleClicked: {
|
||||
renameAction.trigger();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
@ -75,6 +83,7 @@ KCM.ScrollViewKCM {
|
|||
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
id: renameAction
|
||||
enabled: model && !model.IsMissing
|
||||
iconName: "edit-rename"
|
||||
tooltip: i18nc("@info:tooltip", "Rename")
|
||||
|
|
Loading…
Reference in a new issue