[vlc-devel] [PATCH 1/3] qml: fix layouting issues of the Video Info pannel

Pierre Lamot pierre at videolabs.io
Tue Oct 29 14:57:12 CET 2019


  content was cropped when using higher scale factor
---
 .../gui/qt/qml/mediacenter/MCVideoDisplay.qml |  3 ---
 .../qml/mediacenter/VideoExpandableGrid.qml   | 20 +++++++++++--------
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml b/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml
index 7075078f2a..dcddf07513 100644
--- a/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml
@@ -121,9 +121,6 @@ Utils.NavigableFocusScope {
             }
 
 
-            expandDelegateImplicitHeight: view.height/3
-            expandDelegateWidth: view.width
-
             delegate: VideoGridItem {
                 id: videoGridItem
 
diff --git a/modules/gui/qt/qml/mediacenter/VideoExpandableGrid.qml b/modules/gui/qt/qml/mediacenter/VideoExpandableGrid.qml
index 28ca1704b3..fe7188aeea 100644
--- a/modules/gui/qt/qml/mediacenter/VideoExpandableGrid.qml
+++ b/modules/gui/qt/qml/mediacenter/VideoExpandableGrid.qml
@@ -31,17 +31,16 @@ Utils.ExpandGridView {
 
     activeFocusOnTab:true
 
-    property real expandDelegateImplicitHeight: parent.height
-    property real expandDelegateWidth: parent.width
-
     expandDelegate:  Utils.NavigableFocusScope {
         id: expandRect
         property int currentId: -1
         property var model : ({})
         property alias currentItemY: expandRect.y
         property alias currentItemHeight: expandRect.height
-        implicitHeight: expandableGV.expandDelegateImplicitHeight
-        width: expandableGV.expandDelegateWidth
+        height: implicitHeight
+        implicitHeight: arrowRect.implicitHeight
+            + contentRect.implicitHeight
+        width: expandableGV.width
 
         navigationParent: expandableGV
         navigationCancel:  function() {  expandableGV.retract() }
@@ -57,6 +56,7 @@ Utils.ExpandGridView {
             clip: true
             width: Math.sqrt(2) *VLCStyle.icon_normal
             height: width/2
+            implicitHeight: width/2
 
             Rectangle{
                 x: 0
@@ -71,13 +71,16 @@ Utils.ExpandGridView {
 
 
         Rectangle{
-            height: parent.height
+            id: contentRect
+            height: implicitHeight
+            implicitHeight: contentLayout.implicitHeight + VLCStyle.margin_xsmall * 2
             width: parent.width
             clip: true
             color: VLCStyle.colors.bgAlt
-            x: expandableGV.contentX
+            visible: !expandableGV.isAnimating
 
             RowLayout {
+                id: contentLayout
                 anchors {
                     fill: parent
                     topMargin: VLCStyle.margin_xsmall
@@ -216,8 +219,9 @@ Utils.ExpandGridView {
                 }
 
                 Rectangle {
-                    height: parent.height
                     width: 1
+                    Layout.fillHeight: true
+                    Layout.preferredWidth: 1
                     gradient: Gradient {
                         GradientStop { position: 0.0; color: "transparent" }
                         GradientStop { position: 0.25; color: VLCStyle.colors.buttonBorder }
-- 
2.17.1



More information about the vlc-devel mailing list