applets/devicenotifier: forward keys to `ListView`

So pressing arrow keys can navigate in the applet.
wilder-5.26
Fushan Wen 4 years ago
parent 9a77503f0b
commit 75f02fb0cd
  1. 7
      applets/devicenotifier/package/contents/ui/FullRepresentation.qml

@ -29,6 +29,8 @@ PlasmaExtras.Representation {
collapseMarginsHint: true
Keys.forwardTo: [notifierDialog]
header: PlasmaExtras.PlasmoidHeading {
visible: !(Plasmoid.containmentDisplayHints & PlasmaCore.Types.ContainmentDrawsPlasmoidHeading) && devicenotifier.mountedRemovables > 1
PlasmaComponents3.ToolButton {
@ -166,6 +168,11 @@ PlasmaExtras.Representation {
}
}
Keys.onDownPressed: {
notifierDialog.incrementCurrentIndex();
notifierDialog.currentItem.forceActiveFocus();
}
Loader {
anchors.centerIn: parent
width: parent.width - (PlasmaCore.Units.largeSpacing * 4)

Loading…
Cancel
Save