[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
|
bottomPadding: 0
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
|
|
||||||
text: model ? model.display : ""
|
text: model ? model.display : ""
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
|
||||||
|
@ -60,6 +60,14 @@ KCM.ScrollViewKCM {
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
onDoubleClicked: {
|
||||||
|
renameAction.trigger();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -75,6 +83,7 @@ KCM.ScrollViewKCM {
|
||||||
|
|
||||||
actions: [
|
actions: [
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
|
id: renameAction
|
||||||
enabled: model && !model.IsMissing
|
enabled: model && !model.IsMissing
|
||||||
iconName: "edit-rename"
|
iconName: "edit-rename"
|
||||||
tooltip: i18nc("@info:tooltip", "Rename")
|
tooltip: i18nc("@info:tooltip", "Rename")
|
||||||
|
|
Loading…
Reference in a new issue