diff --git a/containments/homescreens/folio/favouritesmodel.cpp b/containments/homescreens/folio/favouritesmodel.cpp index e813e0c0..17736228 100644 --- a/containments/homescreens/folio/favouritesmodel.cpp +++ b/containments/homescreens/folio/favouritesmodel.cpp @@ -4,7 +4,6 @@ #include "favouritesmodel.h" #include "homescreenstate.h" -#include #include #include #include diff --git a/containments/homescreens/folio/qml/CategoryPanel.qml b/containments/homescreens/folio/qml/CategoryPanel.qml index 9ae3285e..c90f517f 100644 --- a/containments/homescreens/folio/qml/CategoryPanel.qml +++ b/containments/homescreens/folio/qml/CategoryPanel.qml @@ -179,7 +179,26 @@ Rectangle { anchors.fill: parent hoverEnabled: true cursorShape: Qt.PointingHandCursor + activeFocusOnTab: true onClicked: root.categorySelected(tile.catId) + + Keys.onPressed: (event) => { + if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter || event.key === Qt.Key_Space) { + root.categorySelected(tile.catId); + event.accepted = true; + } + } + + Accessible.role: Accessible.Button + Accessible.name: tile.catName + + Rectangle { + anchors.fill: parent + color: "transparent" + border.color: Kirigami.Theme.highlightColor + border.width: tileArea.activeFocus ? 2 : 0 + radius: parent.parent.radius + } } } } diff --git a/containments/homescreens/folio/qml/FavouritesBar.qml b/containments/homescreens/folio/qml/FavouritesBar.qml index 0e361302..652d43de 100644 --- a/containments/homescreens/folio/qml/FavouritesBar.qml +++ b/containments/homescreens/folio/qml/FavouritesBar.qml @@ -642,12 +642,12 @@ MouseArea { x: { if (!targetDelegate) return 0 var delegateGlobal = targetDelegate.mapToGlobal(0, 0) - return Math.max(0, delegateGlobal.x + (targetDelegate.width - width) / 2) + return Math.max(0, Math.min(Screen.width - width, delegateGlobal.x + (targetDelegate.width - width) / 2)) } y: { if (!targetDelegate) return 0 var delegateGlobal = targetDelegate.mapToGlobal(0, 0) - return delegateGlobal.y - height - Kirigami.Units.smallSpacing + return Math.max(0, Math.min(Screen.height - height, delegateGlobal.y - height - Kirigami.Units.smallSpacing)) } onVisibleChanged: {