Commit 8fac67d8 authored by Nate Graham's avatar Nate Graham
Browse files

[Sidebar view] Make Intro Page icons keyboard-triggerable

They were focusable via the keyboard, but it wasn't possible to
actually trigger them to open the KCM!

(cherry picked from commit be558715)
parent e3235fef
......@@ -24,22 +24,32 @@ import org.kde.kirigami 2.5 as Kirigami
MouseArea {
id: item
property alias icon: iconItem.source
property alias text: label.text
property string module
property int iconSize: Kirigami.Units.iconSizes.huge
function loadModule() {
systemsettings.loadModule(systemsettings.mostUsedModel.index(index, 0));
}
Layout.minimumWidth: Kirigami.Units.iconSizes.medium
Layout.minimumHeight: column.implicitHeight
cursorShape: Qt.PointingHandCursor
Layout.fillWidth: true
Layout.alignment: Qt.AlignTop
activeFocusOnTab: true
hoverEnabled: true
onClicked: systemsettings.loadModule(systemsettings.mostUsedModel.index(index, 0));
onEntered: systemsettings.requestMostUsedToolTip(index, item.mapToItem(root, 0, Kirigami.Units.largeSpacing, width, height));
onExited: systemsettings.hideMostUsedToolTip();
onClicked: loadModule();
Keys.onEnterPressed: { loadModule(); }
Keys.onReturnPressed: { loadModule(); }
Keys.onTabPressed: {
if (index < (mostUsedRepeater.count-1)) {
event.accepted = false;
......
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