[vlc-commits] [Git][videolan/vlc][master] 3 commits: qml: fix initial index restoring in video group view

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat Jul 9 21:13:04 UTC 2022



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


Commits:
df7ea14a by Prince Gupta at 2022-07-09T20:58:22+00:00
qml: fix initial index restoring in video group view

remove unnecessary overriding property

- - - - -
5a51394c by Prince Gupta at 2022-07-09T20:58:22+00:00
qml: remove unused properties

- - - - -
59f88ce8 by Prince Gupta at 2022-07-09T20:58:22+00:00
qml: simplify group view header

- - - - -


2 changed files:

- modules/gui/qt/medialibrary/qml/MediaGroupDisplay.qml
- modules/gui/qt/medialibrary/qml/VideoAllDisplay.qml


Changes:

=====================================
modules/gui/qt/medialibrary/qml/MediaGroupDisplay.qml
=====================================
@@ -31,18 +31,13 @@ VideoAll {
 
     // Properties
 
-    // NOTE: We need 'var' for properties altered by StackView.replace().
-    property int    initialIndex: 0
-    property var    initialId
-    property string initialTitle
-
     // Aliases
 
     // NOTE: This is used to determine which media(s) shall be displayed.
     property alias parentId: modelVideo.parentId
 
     // NOTE: The title of the group.
-    property string title: initialTitle
+    property string title: ""
 
     // Children
 
@@ -56,20 +51,15 @@ VideoAll {
 
     contextMenu: Util.MLContextMenu { model: modelVideo; showPlayAsAudioAction: true }
 
-    header: Column {
+    header: Widgets.SubtitleLabel {
         width: root.width
 
         topPadding: VLCStyle.margin_normal
         bottomPadding: VLCStyle.margin_normal
 
-        Widgets.SubtitleLabel {
-            anchors.left: parent.left
-            anchors.right: parent.right
-
-            // NOTE: We want this to be properly aligned with the grid items.
-            anchors.leftMargin: contentMargin + VLCStyle.margin_normal
+        // NOTE: We want this to be properly aligned with the grid items.
+        leftPadding: root.contentMargin + VLCStyle.margin_normal
 
-            text: root.title
-        }
+        text: root.title
     }
 }


=====================================
modules/gui/qt/medialibrary/qml/VideoAllDisplay.qml
=====================================
@@ -67,8 +67,8 @@ Widgets.PageLoader {
     function _updateHistoryGroup(group) {
         History.update(["mc", "video", "all", "group", {
                             "initialIndex": group.currentIndex,
-                            "initialId"   : group.parentId,
-                            "initialTitle": group.title
+                            "parentId" : group.parentId,
+                            "title" : group.title
                         }])
     }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/56a87b96a5051a50412e33541232b8ba53674328...59f88ce8965d6af3199acbace73de88d322ca50a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/56a87b96a5051a50412e33541232b8ba53674328...59f88ce8965d6af3199acbace73de88d322ca50a
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