[vlc-devel] [PATCH] qml: Aspect ratio widget changes

Alexandre Janniaux ajanni at videolabs.io
Sun Jul 28 23:08:47 CEST 2019


Hi,

It seems strange to assign an aspect ratio component to a width.
Is it about setting the size of the aspect ratio button ?

Regards,
--
Alexandre Janniaux

On Mon, Jul 29, 2019 at 12:18:00AM +0530, Rohan Rajpal wrote:
> 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
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list