[PATCH 1/2] QML UI: use Material default switches

Rick Walsh rickmwalsh at gmail.com
Sun Jul 23 14:23:18 PDT 2017


On 24 Jul. 2017 1:46 am, "Joakim Bygdell" <j.bygdell at gmail.com> wrote:

On 23 July 2017 at 16:56, Dirk Hohndel <dirk at hohndel.org> wrote:

>
> > On Jul 23, 2017, at 7:45 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
> >
> >
> >> On Jul 23, 2017, at 7:14 AM, Joakim Bygdell <j.bygdell at gmail.com>
> wrote:
> >> Look at my latest PR, the checkboxes are gone.
> >
> > pulling it right now... let's see how I like the other extreme...
> > (I was leaning more towards "all check boxes" than "all switches", but I
> haven't tried it, yet)
>

Thanks for trying this. Unfortunately I don't think it quite works.
Switches and checkboxes are pretty much interchangeable, but replacing a
radio button with a switch doesn't make sense. You should be able to turn
off a switch by touching it. We can't do that with the theme selections.  I
think we need to keep radio buttons for that.


> Yeah, this does look a little odd - but I only tried on the desktop.
> Building an APK now which I will push to the server so everyone can try.
>
> /D


The switches look a lot better if they are smaller.
Our current switch on top, scaled switches in the middle and material
original on the bottom.

This is a good comparison, and I agree smaller is better.

Before realising I liked the default qml Material switch, I was trying to
replicate its dimensions, especially the relative values of each property
so the thing could be scaled easily by changing one value only. Material
may not be right but it's a decent starting point. You might have done
something similar, but if it's helpful, I think I ended up with.
Outer "rectangle" (slider)
Width: gridunit * 1.8
Height: width * 0.4

Inner rectangle (selector)
Width: slider height * 1.4
Height: width

Radius of both is obviously height * 0.5

Dirk, when you say you'd prefer the switches and radio buttons to be about
the same size, which dimension did you mean? A switch with a round selector
is necessarily wider than it is tall. Radio buttons and checkboxes have
same height and width. So same height? Same width? Somewhere in between?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170724/3f29bc20/attachment.html>


More information about the subsurface mailing list