From 67f5c0b1ed4d2fb83f929da89e2d1904e7d3440f Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 8 Jun 2024 11:20:17 -0400 Subject: [PATCH] Fix keyboard navigation in space drawer Some of the items were able to activated via the keyboard, but many were not like the notifications and "create a space" buttons. This is because the signals were hooked up to onClicked but the accessible and keyboard nav were hooked up to onSelected. All of the buttons trigger their actions with onSelected now. (cherry picked from commit 277a4ad124588f98c04016019950a8195ad2a968) --- src/qml/SpaceDrawer.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qml/SpaceDrawer.qml b/src/qml/SpaceDrawer.qml index 1947c1077..951af9d5f 100644 --- a/src/qml/SpaceDrawer.qml +++ b/src/qml/SpaceDrawer.qml @@ -62,7 +62,7 @@ QQC2.Control { activeFocusOnTab: true - onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'NotificationsView'), { + onSelected: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'NotificationsView'), { connection: root.connection }, { title: i18nc("@title", "Notifications") @@ -91,7 +91,7 @@ QQC2.Control { activeFocusOnTab: true checked: RoomManager.currentSpace.length === 0 - onClicked: { + onSelected: { RoomManager.currentSpace = ""; root.selectionChanged(); } @@ -139,7 +139,7 @@ QQC2.Control { activeFocusOnTab: true checked: RoomManager.currentSpace === "DM" - onClicked: { + onSelected: { RoomManager.currentSpace = "DM"; root.selectionChanged(); } @@ -241,7 +241,7 @@ QQC2.Control { text: i18nc("Join ", "Join %1", SpaceHierarchyCache.recommendedSpaceDisplayName) source: SpaceHierarchyCache.recommendedSpaceAvatar.length > 0 ? root.connection.makeMediaUrl(SpaceHierarchyCache.recommendedSpaceAvatar) : "" - onClicked: { + onSelected: { recommendedSpaceDialogComponent.createObject(QQC2.ApplicationWindow.overlay, { connection: root.connection }).open(); @@ -288,7 +288,7 @@ QQC2.Control { activeFocusOnTab: true - onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog'), { + onSelected: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog'), { connection: root.connection, isSpace: true, title: i18nc("@title", "Create a Space")