[vlc-commits] qml: remove hardcoded size in Player

Pierre Lamot git at videolan.org
Tue Nov 19 16:50:02 CET 2019


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Oct 31 16:01:43 2019 +0100| [a0fdbce55da2b1e1c6b51c6a80ab022e26acc8d5] | committer: Jean-Baptiste Kempf

qml: remove hardcoded size in Player

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

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

 modules/gui/qt/qml/player/ControlBar.qml          | 3 +++
 modules/gui/qt/qml/player/Player.qml              | 2 +-
 modules/gui/qt/qml/player/PlayerButtonsLayout.qml | 4 ++--
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/qml/player/ControlBar.qml b/modules/gui/qt/qml/player/ControlBar.qml
index e2fb721e1e..bba07a351f 100644
--- a/modules/gui/qt/qml/player/ControlBar.qml
+++ b/modules/gui/qt/qml/player/ControlBar.qml
@@ -41,7 +41,10 @@ Utils.NavigableFocusScope {
     Keys.onPressed: defaultKeyAction(event, 0)
     onActionCancel: history.previous(History.Go)
 
+    implicitHeight: columnLayout.implicitHeight
+
     ColumnLayout {
+        id: columnLayout
         anchors.fill: parent
         spacing: VLCStyle.margin_xsmall
         anchors.leftMargin: VLCStyle.margin_xlarge
diff --git a/modules/gui/qt/qml/player/Player.qml b/modules/gui/qt/qml/player/Player.qml
index 2bbb5bde00..14ee2ad2cb 100644
--- a/modules/gui/qt/qml/player/Player.qml
+++ b/modules/gui/qt/qml/player/Player.qml
@@ -261,7 +261,7 @@ Utils.NavigableFocusScope {
             }
 
             width: controlBarView.width
-            height: 90 * VLCStyle.scale
+            height: controllerId.implicitHeight
             property alias noAutoHide: controllerId.noAutoHide
 
             MouseArea {
diff --git a/modules/gui/qt/qml/player/PlayerButtonsLayout.qml b/modules/gui/qt/qml/player/PlayerButtonsLayout.qml
index 4fbe96b875..e9f60cd74a 100644
--- a/modules/gui/qt/qml/player/PlayerButtonsLayout.qml
+++ b/modules/gui/qt/qml/player/PlayerButtonsLayout.qml
@@ -32,8 +32,8 @@ Utils.NavigableFocusScope {
     property var defaultSize: VLCStyle.icon_medium
     property bool forceColors: false
 
-    property alias implicitWidth: buttonrow.implicitWidth
-    property alias implicitHeight: buttonrow.implicitHeight
+    implicitWidth: buttonrow.implicitWidth
+    implicitHeight: buttonrow.implicitHeight
 
     Keys.priority: Keys.AfterItem
     Keys.onPressed: {



More information about the vlc-commits mailing list