[vlc-devel] [PATCH 3/3] qml: Aspect ratio widget changes
Rohan Rajpal
rohan17089 at iiitd.ac.in
Fri Jul 19 13:46:47 CEST 2019
Remove hardcoding from aspect ratio
---
modules/gui/qt/qml/player/ControlButtons.qml | 5 ++---
modules/gui/qt/qml/style/VLCStyle.qml | 2 ++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt/qml/player/ControlButtons.qml b/modules/gui/qt/qml/player/ControlButtons.qml
index d3a672d3cd..6ce0ca971b 100644
--- a/modules/gui/qt/qml/player/ControlButtons.qml
+++ b/modules/gui/qt/qml/player/ControlButtons.qml
@@ -394,10 +394,9 @@ Item{
Component{
id: aspectRatioDelegate
Utils.ComboBoxExt {
- id: combo
Layout.alignment: Qt.AlignVCenter
- height: 28 * scale
- width: 100 * scale
+ width: VLCStyle.widthAspectRatio
+ height: VLCStyle.heightAspectRatio
textRole: "display"
model: player.aspectRatio
onCurrentIndexChanged: model.toggleIndex(currentIndex)
diff --git a/modules/gui/qt/qml/style/VLCStyle.qml b/modules/gui/qt/qml/style/VLCStyle.qml
index bf0ca04933..971285531a 100644
--- a/modules/gui/qt/qml/style/VLCStyle.qml
+++ b/modules/gui/qt/qml/style/VLCStyle.qml
@@ -97,6 +97,8 @@ Item {
property int widthSearchInput: 200 * scale;
property int widthSortBox: 150 * scale;
property int widthTeletext: 280 * scale;
+ property int widthAspectRatio: 100 * scale;
+ property int heightAspectRatio: 22 * scale;
property int heightInput: 22 * scale;
property int selectedBorder: 2
--
2.17.1
More information about the vlc-devel
mailing list