Verified Commit 7a14fe9f authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

applets/taskmanager: allow to use keyboard to toggle muted state

This allows the user to use keyboard to move focus to the mute button,
and use return/enter/space to activate the button.
parent 314a219e
......@@ -10,6 +10,8 @@ import org.kde.plasma.core 2.0 as PlasmaCore
MouseArea {
id: audioStreamIconBox
activeFocusOnTab: true
hoverEnabled: true
onClicked: toggleMuted()
......@@ -79,9 +81,13 @@ MouseArea {
opacity: 0
visible: opacity > 0
Keys.onReturnPressed: toggleMuted()
Keys.onEnterPressed: Keys.onReturnPressed(event);
Keys.onSpacePressed: Keys.onReturnPressed(event);
PlasmaCore.FrameSvgItem {
anchors.fill: audioStreamIcon
visible: parent.containsMouse
visible: parent.containsMouse || parent.activeFocus
imagePath: "widgets/viewitem"
prefix: "hover"
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