[vlc-commits] qml: fix hardcoded size in NetworkDisplay home page

Pierre Lamot git at videolan.org
Mon Oct 14 11:59:32 CEST 2019


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Sep 26 11:01:00 2019 +0200| [e14201a9f48441880017452fda6fe4e0bd2d689f] | committer: Jean-Baptiste Kempf

qml: fix hardcoded size in NetworkDisplay home page

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt/qml/mediacenter/MCNetworkDisplay.qml | 6 ++++--
 modules/gui/qt/qml/style/VLCStyle.qml               | 9 +++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/qml/mediacenter/MCNetworkDisplay.qml b/modules/gui/qt/qml/mediacenter/MCNetworkDisplay.qml
index 8cfbe5d54b..bc1e9cf629 100644
--- a/modules/gui/qt/qml/mediacenter/MCNetworkDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/MCNetworkDisplay.qml
@@ -175,6 +175,8 @@ Utils.NavigableFocusScope {
                     width: parent.width
                     height: implicitHeight
 
+                    spacing: VLCStyle.margin_normal
+
                     Utils.LabelSeparator {
                         text: qsTr("Devices")
                         width: flickable.width
@@ -188,7 +190,7 @@ Utils.NavigableFocusScope {
                         visible: machineDM.items.count !== 0
 
                         width: flickable.width
-                        height: 150 //FIXME
+                        height: VLCStyle.gridItem_default_height
                         orientation: ListView.Horizontal
 
                         model: machineDM.parts.grid
@@ -220,7 +222,7 @@ Utils.NavigableFocusScope {
                         focus: false
 
                         width: flickable.width
-                        height: 150 //FIXME
+                        height: VLCStyle.gridItem_default_height
                         orientation: ListView.Horizontal
 
                         model: lanDM.parts.grid
diff --git a/modules/gui/qt/qml/style/VLCStyle.qml b/modules/gui/qt/qml/style/VLCStyle.qml
index aa475840db..c1e1c68c31 100644
--- a/modules/gui/qt/qml/style/VLCStyle.qml
+++ b/modules/gui/qt/qml/style/VLCStyle.qml
@@ -132,6 +132,15 @@ Item {
     property int button_width_normal: 96 * scale
     property int button_width_large: 128 * scale
 
+
+    //GridItem
+    property int gridItem_default_height: VLCStyle.cover_small + VLCStyle.fontHeight_normal + VLCStyle.fontHeight_small + VLCStyle.margin_xxxsmall * 2
+    property int gridItem_default_width: VLCStyle.cover_small + VLCStyle.margin_small * 2
+
+    property int gridItem_video_height: VLCStyle.video_normal_height + VLCStyle.fontHeight_normal + VLCStyle.fontHeight_small * 2  + VLCStyle.margin_xxxsmall * 3
+    property int gridItem_video_width: VLCStyle.video_normal_width + VLCStyle.margin_small * 2
+
+
     //timings
     property int delayToolTipAppear: 500;
     property int timingPlaylistClose: 1000;



More information about the vlc-commits mailing list