[vlc-devel] [PATCH 12/14] qml: don't focus the 'add to medialibary' button when invisible

Pierre Lamot pierre at videolabs.io
Thu Feb 6 13:56:49 CET 2020


---
 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
-- 
2.17.1



More information about the vlc-devel mailing list