<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 29, 2019 at 2:38 AM Alexandre Janniaux <<a href="mailto:ajanni@videolabs.io">ajanni@videolabs.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
It seems strange to assign an aspect ratio component to a width.<br>
Is it about setting the size of the aspect ratio button ?<br></blockquote><div>Yeah.</div><div>I've got a better idea. Add generic values(width_xsmall, width_large etc) in VLCStyle and use those here. I need to use these values in the editor patches anyway.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Regards,<br>
--<br>
Alexandre Janniaux<br>
<br>
On Mon, Jul 29, 2019 at 12:18:00AM +0530, Rohan Rajpal wrote:<br>
> Remove hardcoding from aspect ratio<br>
> ---<br>
>  modules/gui/qt/qml/player/ControlButtons.qml | 5 ++---<br>
>  modules/gui/qt/qml/style/VLCStyle.qml        | 2 ++<br>
>  2 files changed, 4 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/modules/gui/qt/qml/player/ControlButtons.qml b/modules/gui/qt/qml/player/ControlButtons.qml<br>
> index 835ca01ccf..79e518c440 100644<br>
> --- a/modules/gui/qt/qml/player/ControlButtons.qml<br>
> +++ b/modules/gui/qt/qml/player/ControlButtons.qml<br>
> @@ -399,10 +399,9 @@ Item{<br>
>      Component{<br>
>          id: aspectRatioDelegate<br>
>          Utils.ComboBoxExt {<br>
> -            id: combo<br>
>              Layout.alignment: Qt.AlignVCenter<br>
> -            height: 28 * scale<br>
> -            width: 100 * scale<br>
> +            width: VLCStyle.widthAspectRatio<br>
> +            height: VLCStyle.heightAspectRatio<br>
>              textRole: "display"<br>
>              model: player.aspectRatio<br>
>              onCurrentIndexChanged: model.toggleIndex(currentIndex)<br>
> diff --git a/modules/gui/qt/qml/style/VLCStyle.qml b/modules/gui/qt/qml/style/VLCStyle.qml<br>
> index bf0ca04933..971285531a 100644<br>
> --- a/modules/gui/qt/qml/style/VLCStyle.qml<br>
> +++ b/modules/gui/qt/qml/style/VLCStyle.qml<br>
> @@ -97,6 +97,8 @@ Item {<br>
>      property int widthSearchInput: 200 * scale;<br>
>      property int widthSortBox: 150 * scale;<br>
>      property int widthTeletext: 280 * scale;<br>
> +    property int widthAspectRatio: 100 * scale;<br>
> +    property int heightAspectRatio: 22 * scale;<br>
>      property int heightInput: 22 * scale;<br>
><br>
>      property int selectedBorder: 2<br>
> --<br>
> 2.17.1<br>
><br>
> _______________________________________________<br>
> vlc-devel mailing list<br>
> To unsubscribe or modify your subscription options:<br>
> <a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a><br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a></blockquote></div></div>