[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KConfig (Was: small fonts confusing me..)
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-09-19 9:26:35
[Download RAW message or body]

On Mercredi 19 Septembre 2001 02:30, Waldo Bastian wrote:
> On Tuesday 18 September 2001 03:50 pm, David Faure wrote:
> > Did you see my comment in the cvs log, about kconfig ?
> > I suspect much more in KDE got broken by this change....
> 
> Hm? "kconfig" and "broken" ? Do tell?

When reading and writing fonts, KConfig only saves the point size.
But since Qt3, QFont::pointSize() can return -1, if the fontsize was request
in pixels. So we save pointSize==-1 to the config file, and upon loading the font is
of size -1 !

I initially thought we should simply save both.
But Dirk suggested that we might want to save the QFontInfo instead,
so that we save what the font really is. As he also pointed out, this would mean
that the QFont object, which would initially contain the _requested_ size,
would, after saving and reloading, contain the _real_ size instead. But I don't
think this is really a problem.

At least, by saving the QFontInfo data, we can still save only the pointSize,
though this means that we'll request the pointSize upon loading, even
if the pixelsize was initially requested (which might make a difference 
if the resolution has changed meanwhile ?).
The advantage is that we wouldn't have to modify the format of the
font entries in kconfig files, that's what I mean here.

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
KDE, Making The Future of Computing Available Today

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic