effects/overview: Press Enter to create a new desktop
Add `Keys.onReturnPressd` and `Keys.onEnterPressed` to PC3.Button in DesktopBar, so user can trigger the action by pressing Enter.
This commit is contained in:
parent
cd4bdaa8fe
commit
25b035e84c
1 changed files with 6 additions and 1 deletions
|
@ -241,7 +241,9 @@ Item {
|
|||
height: bar.desktopHeight
|
||||
icon.name: "list-add"
|
||||
opacity: hovered ? 1 : 0.75
|
||||
onClicked: desktopModel.create(desktopModel.rowCount())
|
||||
action: Action {
|
||||
onTriggered: desktopModel.create(desktopModel.rowCount())
|
||||
}
|
||||
|
||||
ToolTip.text: i18n("Add Desktop")
|
||||
ToolTip.visible: hovered
|
||||
|
@ -257,6 +259,9 @@ Item {
|
|||
drag.source.desktop = desktopModel.rowCount() + 1;
|
||||
}
|
||||
}
|
||||
|
||||
Keys.onReturnPressed: action.trigger()
|
||||
Keys.onEnterPressed: action.trigger()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue