[Gambas-user] Control sizes with GTK get enlarged

Bruce Steers bsteers4 at gmail.com
Mon Jan 3 19:14:51 CET 2022


On Mon, 3 Jan 2022 at 10:46, Benoît Minisini <g4mba5 at gmail.com> wrote:

> Le 03/01/2022 à 05:59, Bruce Steers a écrit :
> > So I'm using the IDE..
> > Making some custom controls, they are spinable images (works like a
> > spinner but uses images of dials).
> >
> > In the IDE I have set the sizes like this..
> > ImageSpinner1  =  64 64
> > ImageSpinner2  =  64 64
> > ImageSpinner3  =  128 128
> > ImageSpinner4  =  64 64
> > ImageSpinner5  =  64 64
> >
> > that is the output from the test ap as it loads in the images
> > The objects W & H sizes as i have set them in the IDE.
> >
> > When i load it with GTK2 or 3 this happens...
> > ImageSpinner1  =  72 72
> > ImageSpinner2  =  72 72
> > ImageSpinner3  =  144 144
> > ImageSpinner4  =  72 72
> > ImageSpinner5  =  72 72
> >
> > Is that supposed to happen?
> >
> > Cheers
> > BruceS
> >
>
> Yes. By default the size of controls is proportional to the font height.
>
> So if you run the IDE with QT and the project with GTK+, and if the GTK+
> font is bigger than the QT one, it happens.
>
> Regards,
>

But my controls have no font and do not auto-resize for text (or anything)
It it some sort of internal scaling factor that can be disabled?
It's for a DrawingArea that writes (and rotates) an image, correct size was
kinda needed. (although i figured a workaround)

At runtime if i set the controls to be 128x128 they set that size.

Will i have to set everything manually at runtime if i want to ensure
required dimensions are met?

Many thanks
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220103/ceb98e1c/attachment.htm>


More information about the User mailing list