[PATCH] QML UI: scale profile in two stages

Rick Walsh rickmwalsh at gmail.com
Wed Dec 30 11:59:48 PST 2015


On 31 December 2015 at 02:41, Dirk Hohndel <dirk at hohndel.org> wrote:

>
> > On Dec 30, 2015, at 5:22 AM, Rick Walsh <rickmwalsh at gmail.com> wrote:
> >
> > Scale the QML profile in two stages.  Firstly, scale to fit.  Secondly,
> scale
> > again to 95% to create a margin around the profile.
> >
> > The previous method scales to fit a create a margin in one step.  It
> appears
> > more elegant, and the margin is calculated more rationally.
> Unfortunately on
> > some devices, including mine, the resulting profile is cropped for no
> obvious
> > reason.
>
> This does create a bigger margin than I want on some of the larger
> devices, but as you point out, it appears to work which beats the hell out
> of anything I achieved in three days of poking at this.
>
> The 95% was really an arbitrary scale to prove that at least there was
some way to create a margin. It needed to be significant enough that it was
clear it was definitely doing something on my phone. The attached patch
should emulate what was supposed to happen with your method, with
proportionally 1.5 times greater reduction in height than width, reflecting
the dimensions of the profile.


> Well done, Rick! Again.
>
> Can I point you at a dozen more issues with Subsurface-mobile since you
> clearly are the more competent person to work on this? :-)
>
> That was Qt/QML/Android beginners' luck, combined with my summer break,
and it being hot enough outside that I actually prefer being inside during
the day. Today is forecast to reach 39 C / 102 F, so I might have another
commit left in me after I go for a run while it's still coolish outside.
Expect very little from me in the New Year - I'm back at work on Monday,
and have some data collection (diving) to do before then.


> New binaries are up on the daily download site and should percolate to the
> Google Play store eventually.
>
> Incidentally, those are also built with Qt 5.6 (current master). Since
> none of my approaches worked I figured I'd try to see if anything had
> changed with the very latest Qt and built the Android cross build
> infrastructure from source (a very entertaining endeavor, I might add). But
> I verified that Rick's patch fixes things with 5.5.1 as well.
>

Qt for Android from source? I thought you had enough to keep you busy as it
was. If the new Qt means that the margins work as intended with your
method, I will not be offended if you don't take the attached patch, and
revert my previous one.

Cheers,

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20151231/b3bab92c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-QML-UI-make-profile-margin-scale-proportional-to-dim.patch
Type: text/x-patch
Size: 1671 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20151231/b3bab92c/attachment-0001.bin>


More information about the subsurface mailing list