lockscreen: make MediaControls tab-focus only

Users are unlikely to want focus diverted away from the
password field when interacting with the media controls;
setting the focus policy to TabFocus makes sure that
mouse usage doesn't divert focus while keeping keyboard
navigation intact.

BUG: 437390
FIXED-IN: 5.22


(cherry picked from commit 5c48f4a335)
wilder-5.22
Jan Blackquill 5 years ago committed by Nate Graham
parent d974a7f571
commit bcc4ff7305
  1. 3
      lookandfeel/contents/lockscreen/MediaControls.qml

@ -134,6 +134,7 @@ Item {
} }
PlasmaComponents3.ToolButton { PlasmaComponents3.ToolButton {
focusPolicy: Qt.TabFocus
enabled: mpris2Source.canGoBack enabled: mpris2Source.canGoBack
Layout.preferredHeight: PlasmaCore.Units.gridUnit*2 Layout.preferredHeight: PlasmaCore.Units.gridUnit*2
Layout.preferredWidth: Layout.preferredHeight Layout.preferredWidth: Layout.preferredHeight
@ -147,6 +148,7 @@ Item {
} }
PlasmaComponents3.ToolButton { PlasmaComponents3.ToolButton {
focusPolicy: Qt.TabFocus
Layout.fillHeight: true Layout.fillHeight: true
Layout.preferredWidth: height // make this button bigger Layout.preferredWidth: height // make this button bigger
icon.name: mpris2Source.playing ? "media-playback-pause" : "media-playback-start" icon.name: mpris2Source.playing ? "media-playback-pause" : "media-playback-start"
@ -158,6 +160,7 @@ Item {
} }
PlasmaComponents3.ToolButton { PlasmaComponents3.ToolButton {
focusPolicy: Qt.TabFocus
enabled: mpris2Source.canGoNext enabled: mpris2Source.canGoNext
Layout.preferredHeight: PlasmaCore.Units.gridUnit*2 Layout.preferredHeight: PlasmaCore.Units.gridUnit*2
Layout.preferredWidth: Layout.preferredHeight Layout.preferredWidth: Layout.preferredHeight

Loading…
Cancel
Save