[Gambas-user] Height and width units?

Benoit Minisini gambas at ...1...
Wed Dec 10 02:18:55 CET 2008


On mardi 9 décembre 2008, Benoit Minisini wrote:
> On mardi 9 décembre 2008, Jussi Lahtinen wrote:
> > > Which GUI component do you use?
> >
> >  GTK, I tried to switch it to QT, and problem gone!
> >  Is switching GUI component legit thing to do, or can I mess up my code
> > with it? This time everything ok, but with real project... maybe I'm just
> > having M$ nightmare
> >  induced paranoia...
>
> This is just a bug in gb.gtk.
>

This is not a bug in gb.gtk. As I said before, control and window dimensions 
are multiple of Desktop.Scale. Desktop.Scale is half the height of the 
default font in pixels.

Alas, the same font with the same size with the same resolution does not 
always have the same height with Qt and GTK+! Even if they are the same on 
the screen. Yeepee! 

The IDE uses gb.qt, so, sometimes, when you run a project that uses gb.gtk or 
gb.gui on Gnome, your windows and controls does not have the same absolute 
size. Because Desktop.Scale is different.

I think I will find a workaround with the mess of QT/GTK+ font management, but 
only in Gambas 3 I think...

Or you can unset the (Scaled) property of the form: when this property is 
FALSE, the size and positions of the form and its controls are absolute.

Regards,

-- 
Benoit Minisini




More information about the User mailing list