[vlc-commits] [Git][videolan/vlc][master] 3 commits: qml: fix grid item scaling

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Fri Apr 22 13:32:23 UTC 2022



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
7c2f7ee6 by Prince Gupta at 2022-04-22T13:17:26+00:00
qml: fix grid item scaling

- - - - -
46efa621 by Prince Gupta at 2022-04-22T13:17:26+00:00
qml: fix header positioning with scaling in ExpandGridView

use bindings on position of header in ExpandGridView

- - - - -
1df9a354 by Prince Gupta at 2022-04-22T13:17:26+00:00
qml: avoid potential invalid header access in ExpandGridView

- - - - -


2 changed files:

- modules/gui/qt/widgets/qml/ExpandGridView.qml
- modules/gui/qt/widgets/qml/GridItem.qml


Changes:

=====================================
modules/gui/qt/widgets/qml/ExpandGridView.qml
=====================================
@@ -593,9 +593,13 @@ FocusScope {
         Loader {
             id: headerItemLoader
 
+            x: 0
+            y: root.topMargin
+
             //load the header early (when the first row is visible)
             visible: flickable.contentY < (root.headerHeight + root._effectiveCellHeight + root.topMargin)
-            focus: item.focus
+
+            focus: (status === Loader.Ready) ? item.focus : false
             onFocusChanged: {
                 if (!focus)
                     return;
@@ -603,14 +607,11 @@ FocusScope {
                 // when we gain the focus ensure the widget is fully visible
                 animateFlickableContentY(0);
             }
-            onLoaded: {
-                item.x = 0
-                item.y = root.topMargin
-            }
         }
 
         Loader {
             id: footerItemLoader
+
             focus: (status === Loader.Ready) ? item.focus : false
 
             y: root.topMargin + root.headerHeight + (root._effectiveCellHeight * (Math.ceil(model.count / root._nbItemPerRow))) +


=====================================
modules/gui/qt/widgets/qml/GridItem.qml
=====================================
@@ -254,12 +254,13 @@ T.Control {
             Widgets.MediaCover {
                 id: picture
 
-                width: pictureWidth
-                height: pictureHeight
                 playCoverVisible: false
                 playCoverOpacity: 0
                 radius: VLCStyle.gridCover_radius
 
+                Layout.preferredWidth: pictureWidth
+                Layout.preferredHeight: pictureHeight
+
                 onPlayIconClicked: root.playClicked()
             }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/01476d5c4e3623f21a860fee66fe844a046a1bd7...1df9a3547497a28de110c54706549d43d4de512b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/01476d5c4e3623f21a860fee66fe844a046a1bd7...1df9a3547497a28de110c54706549d43d4de512b
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