Commit be558715 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!
parent 54da94bc
......@@ -24,10 +24,15 @@ import org.kde.kirigami 2.5 as Kirigami
MouseArea {
id: item
property alias icon: iconItem.source
property alias text: label.text
property string module
function loadModule() {
systemsettings.loadModule(systemsettings.mostUsedModel.index(index, 0));
}
width: childrenRect.width
height: childrenRect.height
......@@ -35,10 +40,13 @@ MouseArea {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
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;
......@@ -53,6 +61,7 @@ MouseArea {
root.focusPreviousRequest();
}
}
ColumnLayout {
Kirigami.Icon {
id: iconItem
......
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