[vlc-devel] [PATCH] qml: Aspect ratio widget changes
Rohan Rajpal
rohan17089 at iiitd.ac.in
Sun Jul 28 20:48:00 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 835ca01ccf..79e518c440 100644
--- a/modules/gui/qt/qml/player/ControlButtons.qml
+++ b/modules/gui/qt/qml/player/ControlButtons.qml
@@ -399,10 +399,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