[vlc-commits] [Git][videolan/vlc][master] 5 commits: qml/tableview: add displayMarginEnd property

Jean-Baptiste Kempf gitlab at videolan.org
Sat May 15 15:57:32 UTC 2021



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


Commits:
0e0f99db by Prince Gupta at 2021-05-15T15:41:11+00:00
qml/tableview: add displayMarginEnd property

- - - - -
46f9f82d by Prince Gupta at 2021-05-15T15:41:11+00:00
qml/gridview: implement displayMarginEnd property

- - - - -
5dc6c97f by Prince Gupta at 2021-05-15T15:41:11+00:00
qml/listview: don't clip by default

- - - - -
7367e134 by Prince Gupta at 2021-05-15T15:41:11+00:00
qml/gridview: don't clip by default

- - - - -
d0de31d4 by Prince Gupta at 2021-05-15T15:41:11+00:00
qml: use hardbounds for main views

for blur effect behind miniplayer, use displaymarginEnd
property and disable clipping in views

fixes #25679
fixes #25678

- - - - -


13 changed files:

- modules/gui/qt/maininterface/qml/MainDisplay.qml
- modules/gui/qt/maininterface/qml/MainGridView.qml
- modules/gui/qt/maininterface/qml/MainTableView.qml
- modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
- modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml
- modules/gui/qt/medialibrary/qml/VideoAll.qml
- modules/gui/qt/network/qml/NetworkBrowseDisplay.qml
- modules/gui/qt/network/qml/NetworkDisplay.qml
- modules/gui/qt/network/qml/NetworkHomeDisplay.qml
- modules/gui/qt/network/qml/ServicesHomeDisplay.qml
- modules/gui/qt/widgets/qml/ExpandGridView.qml
- modules/gui/qt/widgets/qml/KeyNavigableListView.qml
- modules/gui/qt/widgets/qml/KeyNavigableTableView.qml


Changes:

=====================================
modules/gui/qt/maininterface/qml/MainDisplay.qml
=====================================
@@ -212,6 +212,7 @@ Widgets.NavigableFocusScope {
                             top: parent.top
                             left: parent.left
                             bottom: parent.bottom
+                            bottomMargin: miniPlayer.height
                             right: playlistColumn.visible ? playlistColumn.left : playlistColumn.right
                             rightMargin: (mainInterface.playlistDocked && mainInterface.playlistVisible)
                                          ? 0


=====================================
modules/gui/qt/maininterface/qml/MainGridView.qml
=====================================
@@ -22,9 +22,5 @@ import "qrc:///widgets/" as Widgets
 Widgets.ExpandGridView {
     id: root
 
-    gridScrollBar.bottomPadding: footerItem.height
-
-    footerDelegate: MiniPlayerBottomMargin {
-        width: root.width
-    }
+    displayMarginEnd: miniPlayer.height
 }


=====================================
modules/gui/qt/maininterface/qml/MainTableView.qml
=====================================
@@ -23,9 +23,5 @@ import "qrc:///widgets/" as Widgets
 Widgets.KeyNavigableTableView {
     id: root
 
-    listScrollBar.bottomPadding: footerItem.height
-
-    footer: MiniPlayerBottomMargin {
-        width: root.width
-    }
+    displayMarginEnd: miniPlayer.height
 }


=====================================
modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
=====================================
@@ -119,9 +119,7 @@ Widgets.NavigableFocusScope {
                                  root.width * .5)
 
             focus: true
-            footer: MainInterface.MiniPlayerBottomMargin {
-            }
-
+            displayMarginEnd: miniPlayer.height // to get blur effect while scrolling in mainview
             navigationParent: root
             navigationRightItem: albumSubView
             navigationCancel: function() {


=====================================
modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml
=====================================
@@ -65,9 +65,7 @@ Widgets.NavigableFocusScope {
             else
                 tracklistdisplay_id.currentIndex = 0;
         }
-        listScrollBar.bottomPadding: footerItem.height
-        footer: MainInterface.MiniPlayerBottomMargin {
-        }
+        displayMarginEnd: miniPlayer.height // to get blur effect while scrolling in mainview
     }
 
     EmptyLabel {


=====================================
modules/gui/qt/medialibrary/qml/VideoAll.qml
=====================================
@@ -144,8 +144,6 @@ Widgets.NavigableFocusScope {
 
         anchors.fill: parent
 
-        clip: true
-
         initialItem: (mainInterface.gridView) ? grid : list
 
         focus: (model.count !== 0)


=====================================
modules/gui/qt/network/qml/NetworkBrowseDisplay.qml
=====================================
@@ -322,8 +322,8 @@ Widgets.NavigableFocusScope {
 
     Widgets.StackViewExt {
         id: view
+
         anchors.fill:parent
-        clip: true
         focus: true
         initialItem: mainInterface.gridView ? gridComponent : tableComponent
 


=====================================
modules/gui/qt/network/qml/NetworkDisplay.qml
=====================================
@@ -87,8 +87,8 @@ Widgets.NavigableFocusScope {
 
     Widgets.StackViewExt {
         id: view
+
         anchors.fill:parent
-        clip: true
         focus: true
 
         onCurrentItemChanged: {


=====================================
modules/gui/qt/network/qml/NetworkHomeDisplay.qml
=====================================
@@ -120,10 +120,6 @@ Widgets.NavigableFocusScope {
                         _centerFlickableOnItem(lanLabel.y, lanSection.y + lanSection.height)
                 }
             }
-
-            MainInterface.MiniPlayerBottomMargin {
-                width: flickable.width
-            }
         }
 
     }


=====================================
modules/gui/qt/network/qml/ServicesHomeDisplay.qml
=====================================
@@ -150,10 +150,7 @@ Widgets.PageLoader {
             leftMargin: VLCStyle.margin_large
             rightMargin: VLCStyle.margin_large
             spacing: VLCStyle.margin_xsmall
-
-            footer: MainInterface.MiniPlayerBottomMargin {
-                width: servicesView.width
-            }
+            displayMarginEnd: miniPlayer.height // to get blur effect while scrolling in mainview
 
             delegate: Rectangle {
                 width: servicesView.width - VLCStyle.margin_large * 2


=====================================
modules/gui/qt/widgets/qml/ExpandGridView.qml
=====================================
@@ -38,6 +38,9 @@ NavigableFocusScope {
     property int horizontalSpacing: VLCStyle.column_margin_width
     property int verticalSpacing: VLCStyle.column_margin_width
 
+    property int displayMarginEnd: 0
+    onDisplayMarginEndChanged: flickable.layout(false)
+
     readonly property int _effectiveCellWidth: cellWidth + horizontalSpacing
     readonly property int _effectiveCellHeight: cellHeight + verticalSpacing
 
@@ -204,7 +207,7 @@ NavigableFocusScope {
         var myContentY = flickable.contentY - root.headerHeight - topMargin
 
         var contentYWithoutExpand = myContentY
-        var heightWithoutExpand = flickable.height
+        var heightWithoutExpand = flickable.height + root.displayMarginEnd
         if (root.expandIndex !== -1) {
             if (myContentY >= expandItem.y && myContentY < expandItem.y + _expandItemVerticalSpace)
                 contentYWithoutExpand = expandItem.y
@@ -383,7 +386,6 @@ NavigableFocusScope {
     Flickable {
         id: flickable
 
-        clip: true
         flickableDirection: Flickable.VerticalFlick
         boundsBehavior: Flickable.StopAtBounds
         boundsMovement :Flickable.StopAtBounds


=====================================
modules/gui/qt/widgets/qml/KeyNavigableListView.qml
=====================================
@@ -69,6 +69,9 @@ NavigableFocusScope {
     property alias add: view.add
     property alias displaced: view.displaced
 
+    property alias displayMarginBeginning: view.displayMarginBeginning
+    property alias displayMarginEnd: view.displayMarginEnd
+
     property int highlightMargin: VLCStyle.margin_large
     property var fadeColor: undefined
     property alias fadeRectBottomHovered: fadeRectBottom.isHovered
@@ -134,7 +137,6 @@ NavigableFocusScope {
 
         focus: true
 
-        clip: true
         ScrollBar.vertical: ScrollBar { id: scroll_id }
         ScrollBar.horizontal: ScrollBar { visible: view.contentWidth > view.width }
 


=====================================
modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
=====================================
@@ -90,6 +90,8 @@ NavigableFocusScope {
 
     property alias listScrollBar: view.listScrollBar
 
+    property alias displayMarginEnd: view.displayMarginEnd
+
     Accessible.role: Accessible.Table
 
     function positionViewAtIndex(index, mode) {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/d9479a8f2e10dc581a94058da47fa2696fbc0ee1...d0de31d47f553877c5c30c322230ee902e9e3432

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




More information about the vlc-commits mailing list