[vlc-commits] qml: don't focus the 'add to medialibrary' button when invisible

Pierre Lamot git at videolan.org
Thu Feb 13 11:06:44 CET 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Tue Feb  4 11:07:57 2020 +0100| [6b9e4cb369169821c5bcb3a5c5885a9faf3fe217] | committer: Jean-Baptiste Kempf

qml: don't focus the 'add to medialibrary' button when invisible

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6b9e4cb369169821c5bcb3a5c5885a9faf3fe217
---

 modules/gui/qt/network/qml/NetworkBrowseDisplay.qml | 5 +++++
 modules/gui/qt/widgets/qml/LabelSeparator.qml       | 1 +
 2 files changed, 6 insertions(+)

diff --git a/modules/gui/qt/network/qml/NetworkBrowseDisplay.qml b/modules/gui/qt/network/qml/NetworkBrowseDisplay.qml
index 08c7fa09ce..de6913e140 100644
--- a/modules/gui/qt/network/qml/NetworkBrowseDisplay.qml
+++ b/modules/gui/qt/network/qml/NetworkBrowseDisplay.qml
@@ -125,6 +125,8 @@ Widgets.NavigableFocusScope {
                 width: view.width
                 text: providerModel.name
 
+                navigable: inlineItem.visible
+
                 inlineComponent: Widgets.TabButtonExt {
                     focus: true
                     iconTxt: providerModel.indexed ? VLCIcons.remove : VLCIcons.add
@@ -211,6 +213,8 @@ Widgets.NavigableFocusScope {
                 text: providerModel.name
                 width: view.width
 
+                navigable: inlineItem.visible
+
                 inlineComponent: Widgets.TabButtonExt {
                     focus: true
                     iconTxt: providerModel.indexed ? VLCIcons.remove : VLCIcons.add
@@ -221,6 +225,7 @@ Widgets.NavigableFocusScope {
 
                 Keys.onPressed: defaultKeyAction(event, 0)
                 navigationParent: root
+                navigationUpItem: root.navigationUpItem
                 navigationDown: function() {
                     focus = false
                     listView.forceActiveFocus()
diff --git a/modules/gui/qt/widgets/qml/LabelSeparator.qml b/modules/gui/qt/widgets/qml/LabelSeparator.qml
index 5aa1b8f86c..0bbe0ce4ef 100644
--- a/modules/gui/qt/widgets/qml/LabelSeparator.qml
+++ b/modules/gui/qt/widgets/qml/LabelSeparator.qml
@@ -34,6 +34,7 @@ Widgets.NavigableFocusScope {
     property alias color: txt.color
 
     property Component inlineComponent: Item {}
+    property alias inlineItem: inlineComponentLoader.item
 
     ColumnLayout {
         id: colLayout



More information about the vlc-commits mailing list