Verified Commit 15d21bdf authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

applets/showActivityManager: add keyboard navigation support

parent 8125848b
......@@ -18,6 +18,8 @@ Kirigami.FormLayout {
property alias cfg_showActivityIcon: radioCurrentActivityIcon.checked
property alias cfg_showActivityName: checkShowActivityName.checked
Item { Kirigami.FormData.isSection: true }
RadioButton {
id: radioCurrentActivityIcon
......
......@@ -5,7 +5,7 @@
SPDX-License-Identifier: LGPL-2.0-or-later
*/
import QtQuick 2.0
import QtQuick 2.15
import QtQuick.Layouts 1.1
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
......@@ -39,6 +39,7 @@ DND.DropArea {
property bool showActivityName: plasmoid.configuration.showActivityName
property bool showActivityIcon: plasmoid.configuration.showActivityIcon
Plasmoid.onActivated: ActivitySwitcher.Backend.toggleActivityManager()
Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation
onDragEnter: {
......@@ -56,9 +57,21 @@ DND.DropArea {
MouseArea {
anchors.fill: parent
onClicked: {
ActivitySwitcher.Backend.toggleActivityManager()
activeFocusOnTab: true
Keys.onPressed: {
switch (event.key) {
case Qt.Key_Space:
case Qt.Key_Enter:
case Qt.Key_Return:
case Qt.Key_Select:
Plasmoid.activated();
break;
}
}
onClicked: Plasmoid.activated()
}
PlasmaCore.ToolTipArea {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment