[Gambas-user] GAMBAS IDE font/form size versus runtime font/form size

Benoît Minisini gambas at ...1...
Sun Jun 21 15:33:56 CEST 2009


> kevinfishburne ha scritto:
> > I'm using GAMBAS 2.13 under Ubuntu 9.10 development branch and the GNOME
> > desktop environment. I've noticed that the GAMBAS IDE ignores GNOME font
> > sizes, but when I run a GAMBAS app it adheres to GNOME's font sizes,
> > adjusting form and control sizes accordingly. I can't tell for certain
> > but it appears that the GAMBAS IDE uses QT rather than GTK. My theory is
> > that the GAMBAS IDE uses some hidden QT/KDE font size but that a running
> > GAMBAS app uses whatever GUI/fonts correspond with the currently running
> > desktop environment (in my case GNOME). Is that what is happening?
> >
> > My basic problem is that the GAMBAS IDE form and font sizes do not match
> > the form and font sizes of a running GAMBAS app. To workaround this I
> > have to set the "application font" size to 8 instead of 10 in GNOME,
> > which then affects every other app as well. Is it possible to adjust
> > GAMBAS, QT, or KDE's font sizes so that the GAMBAS IDE will more closely
> > match the GAMBAS app running in GNOME?
>
> The Gambas IDE uses QT, but your program can use QT _or_ GTK.
>
> In the project options/components you can tell your program to use QT,
> GTK, or "test if KDE is running and, if so, use QT; otherwise use GTK"
> (gb.gui).
> This wide choice is really pretty but, as always, every choice comes
> along with dark sides... if you force your program to use QT, then you
> solve your problem for your machine, but your program will not run on
> machines without QT.
>
> KDE claims to be able to apply its settings even on non-kde programs,
> and indeed this is true at least in part, but this is a little
> uncertain. You could switch to KDE...  but I know this is probably a bad
> solution.
>
> I had similar problems, and resorted to set the Scaled property to
> false. This can work, only partly, and only if you let the user choose
> the standard font for the application and save it as a preference.
>
> The better solution, unfortunately not available at the moment, would be
> to have the Gambas IDE adapt itself to the current environment, just
> like its generated programs do: the gambas IDE is a gambas application,
> at the end. But it uses components which are not available in GTK.
> You could take the IDE source, and modify it to suite your needs. Not
> easy...
>
> Perhaps there is a wrong concept in your base idea... the best would be
> to let the system choose font sizes and control dimensions, because you
> don't know in advance what resolution and font size your users will
> have. But this idea does not work very well, not even in famous and big
> programs. And perhaps, you are the only user of your programs.
>
> Probably I didn't reply to your question, but instead I added more
> doubts to yours. This is a really complicated matter.
>
> Hope anyway these infos can come handy - regards,

By default, form and control dimensions are proportional to the desktop font 
height.

Alas even if you choose the same font both in Qt and in GTK+, you don't have 
the same result, because the two toolkits often do not return the same height 
for the same font! Even if they really look exactly the same on the screen!

Really weird...

Maybe I will find a better solution before the release of Gambas 3...

-- 
Benoît




More information about the User mailing list