[vlc-commits] qml: fix focus issue with empty label in MusicArtistDisplay

Prince Gupta git at videolan.org
Wed Jan 27 09:25:34 UTC 2021


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Fri Jan 15 20:23:47 2021 +0530| [7a5eb6bd4a53f8baa1cd9bb01594567d116dde33] | committer: Pierre Lamot

qml: fix focus issue with empty label in MusicArtistDisplay

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

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

 modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml
index a0635b3a91..798c168d03 100644
--- a/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml
@@ -237,7 +237,8 @@ Widgets.PageLoader {
                 id: view
 
                 anchors.fill: parent
-                focus: true
+                visible: artistModel.count > 0
+                focus: artistModel.count > 0
                 initialItem: mainInterface.gridView ? gridComponent : tableComponent
             }
 
@@ -255,6 +256,7 @@ Widgets.PageLoader {
             EmptyLabel {
                 anchors.fill: parent
                 visible: artistModel.count === 0
+                focus: artistModel.count === 0
                 text: i18n.qtr("No artists found\nPlease try adding sources, by going to the Network tab")
                 navigationParent: root
                 cover: VLCStyle.noArtArtistCover



More information about the vlc-commits mailing list