[vlc-commits] [Git][videolan/vlc][master] qml: use nbItemPerRow of "Videos" model instead of recentVideos

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Thu Feb 1 21:14:36 UTC 2024



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
a63946b5 by Leon Vitanos at 2024-02-01T20:52:05+00:00
qml: use nbItemPerRow of "Videos" model instead of recentVideos

fixes a constant model reset, when there are no resent videos

- - - - -


2 changed files:

- modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml
- modules/gui/qt/medialibrary/qml/VideoRecentVideos.qml


Changes:

=====================================
modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml
=====================================
@@ -264,6 +264,8 @@ VideoAll {
         leftPadding: root.leftPadding
         rightPadding: root.rightPadding
 
+        nbItemPerRow: Helpers.get(root.currentItem, "nbItemPerRow", 0)
+
         subtitleText: (root.model && root.model.count > 0) ? I18n.qtr("Videos") : ""
 
         Navigation.parentItem: root


=====================================
modules/gui/qt/medialibrary/qml/VideoRecentVideos.qml
=====================================
@@ -41,6 +41,8 @@ FocusScope {
     property int leftPadding: VLCStyle.margin_xsmall
     property int rightPadding: VLCStyle.margin_xsmall
 
+    property int nbItemPerRow
+
     // Settings
 
     implicitHeight: recentVideosColumn.height
@@ -62,8 +64,7 @@ FocusScope {
 
         ml: MediaLib
 
-        limit: MainCtx.gridView ? view.currentItem.nbItemPerRow ?
-                                              view.currentItem.nbItemPerRow : 0
+        limit: MainCtx.gridView ? root.nbItemPerRow
                                 : 5
 
         searchPattern: MainCtx.search.pattern



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a63946b5781c387713a74f90350ffaf6506f4716

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a63946b5781c387713a74f90350ffaf6506f4716
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list