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
Mobile UI - Checkbox allways the same size
- DanielRichter
- Posts:6
- Joined: Fri Jun 30, 2017 11:12 am
Mobile UI - Checkbox allways the same size
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: Mobile UI - Checkbox allways the same size
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:
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
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.
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
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.
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.