[vlc-commits] qml: fix navigation when active focused IconToolButton becomes disabled
Fatih Uzunoglu
git at videolan.org
Mon Dec 7 10:08:43 UTC 2020
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Dec 4 02:01:59 2020 +0300| [39152505c8d1e3effb13d5dddcd5cb38104b8b04] | committer: Pierre Lamot
qml: fix navigation when active focused IconToolButton becomes disabled
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=39152505c8d1e3effb13d5dddcd5cb38104b8b04
---
modules/gui/qt/widgets/qml/IconToolButton.qml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/modules/gui/qt/widgets/qml/IconToolButton.qml b/modules/gui/qt/widgets/qml/IconToolButton.qml
index 47c51ff673..b90be77273 100644
--- a/modules/gui/qt/widgets/qml/IconToolButton.qml
+++ b/modules/gui/qt/widgets/qml/IconToolButton.qml
@@ -38,6 +38,18 @@ ToolButton {
enabled: !paintOnly
+ onActiveFocusChanged: {
+ if (!enabled) {
+ var keyNavigationLeft = control.KeyNavigation.left
+ var keyNavigationRight = control.KeyNavigation.right
+
+ if (!!keyNavigationLeft)
+ keyNavigationLeft.forceActiveFocus()
+ else if (!!keyNavigationRight)
+ keyNavigationRight.forceActiveFocus()
+ }
+ }
+
contentItem: Item {
Label {
More information about the vlc-commits
mailing list