Mobile UI - Checkbox allways the same size

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
4 posts • Page 1 of 1
DanielRichter
Posts:6
Joined: Fri Jun 30, 2017 11:12 am

Mobile UI - Checkbox allways the same size

Post by DanielRichter »

Hello everyone,

Using the Mobile UI App, I realized that checkboxes won't scale in size if I zoom in or out. So they have always the same size no matter what (I think radio buttons and a few other graphical objects could suffer the same problem).

Did anybody else had problems with that? Is there a solution besides building my own checkbox? Could this problem be addressed in a future patch? Or did I oversee something and it was a mistake on my part?

Kind regards
Daniel

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Mobile UI - Checkbox allways the same size

Post by mkoller »

The display of the checkbox/radio button depends on the widget style used, and the available widget styles draw pixmaps with a fixed size.
What you can do is to use a stylesheet.css file to change that. E.g. we use the following so that in the mobile UI first dialog where you can also change the language, the radio buttons are larger:

Code: Select all

QRadioButton::indicator:unchecked
{
  background-color: white;
  border: 0.3em solid white;
  width: 1.5em;
  height: 1.5em;
}

QRadioButton::indicator:checked
{
  background-color: #0f55b9;
  border: 0.3em solid white;
  width: 1.5em;
  height: 1.5em;
}

DanielRichter
Posts:6
Joined: Fri Jun 30, 2017 11:12 am

Re: Mobile UI - Checkbox allways the same size

Post by DanielRichter »

Ok, thank you for the answer.

I changed the width AND height from 13px to 1.5em.
But now the checkbox only increases it's size horizontally. The vertical size stays the same, so the further I zoom out, the more it looks like a rectangle.

Code: Select all


QCheckBox::indicator
{
  border:         0.3em solid #FFFFFF;
  background: #FFFFFF;
  color:           black;
  width:          1.5em;
  height:         1.5em;
}



DanielRichter
Posts:6
Joined: Fri Jun 30, 2017 11:12 am

Re: Mobile UI - Checkbox allways the same size

Post by DanielRichter »

So I found the problem. It was quite trivial...

The frame I drew, while inserting the checkbox was to small. With my code only the small square tried to resize and not the whole object.

4 posts • Page 1 of 1