[vlc-commits] qml: widgets: handling the header size changing in ExpandGridView fixed

Aleksey Kuznetsov git at videolan.org
Mon Jan 4 12:40:42 UTC 2021


vlc | branch: master | Aleksey Kuznetsov <Aleksey.Kuznetsov at noveogroup.com> | Wed Dec 30 15:52:21 2020 +0700| [887c5998deb9c7a7c77f7f7be93422ecc8749b08] | committer: Pierre Lamot

qml: widgets: handling the header size changing in ExpandGridView fixed

Header size in the view were fixed on creating the view and this value
were used for calculating the items positions. If the header changes its
size the view did not take this into account.
Handling the header item size changing added with forcing the layout
updating.

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

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

 modules/gui/qt/widgets/qml/ExpandGridView.qml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/widgets/qml/ExpandGridView.qml b/modules/gui/qt/widgets/qml/ExpandGridView.qml
index 1ec1e8aac1..24ca2f0dd1 100644
--- a/modules/gui/qt/widgets/qml/ExpandGridView.qml
+++ b/modules/gui/qt/widgets/qml/ExpandGridView.qml
@@ -72,7 +72,7 @@ NavigableFocusScope {
     property alias expandItem: expandItemLoader.item
 
     property Component headerDelegate: Item{}
-    property int headerHeight: headerItemLoader.implicitHeight
+    property alias headerHeight: headerItemLoader.implicitHeight
     property alias headerItem: headerItemLoader.item
 
     property alias footerItem: footerItemLoader.item
@@ -366,6 +366,13 @@ NavigableFocusScope {
                _expandItemVerticalSpace
         }
 
+        Connections {
+            target: headerItemLoader
+            onHeightChanged: {
+                flickable.layout(true)
+            }
+        }
+
         Connections {
             target: footerItem
             onHeightChanged: {



More information about the vlc-commits mailing list