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

Rohan Rajpal rohanvideolan at gmail.com
Mon Jul 29 06:52:25 CEST 2019


On Mon, Jul 29, 2019 at 2:38 AM Alexandre Janniaux <ajanni at videolabs.io>
wrote:

> Hi,
>
> It seems strange to assign an aspect ratio component to a width.
> Is it about setting the size of the aspect ratio button ?
>
Yeah.
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.

>
> 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
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190729/a27f69e9/attachment.html>


More information about the vlc-devel mailing list