[PATCH] fix KDialog to use platform native layout spacing and margins

Friedrich W. H. Kossebau kossebau at kde.org
Thu Dec 4 22:39:22 GMT 2008


Hi Christoph,

Am Samstag, 29. November 2008, um 20:21 Uhr, schrieb Christoph Feck:
> Hello,
>
> this is my first post to this list, so please be gentle with my mistakes :)
>
> I noticed that KDialog uses its own hard coded sizes for spacing and
> margins, which I consider bad, because Qt styles can compute layouts
> depending on widget types and pairs, so even a configurable value would be
> wrong.
>
> This patch should "move" those fixed values to KStyle, meaning any style
> automatically inherits the KDE defaults (should they ever change).
>
> Additionally, KDialog no longer sets these attributes on it's TopLayout, so
> that it can respect the style's layoutSpacingImplementation() method, which
> results in better platform native appearance e.g. on QMacStyle.

Cannot review, at least nothing more than to say the patch itself looks okay 
superficially. And I'd welcome the described behaviour. :)

Instead questions:
Q1:
Is there a way to also support the property int KDialog::groupSpacingHint() by 
KStyle and Qt's layout system? It was only recently added to KDE, for 4.2, 
because the HIG [HIG] advises to use some grouping in dialogs.

[HIG] 
http://wiki.openusability.org/guidelines/index.php/Design_and_Layout:Layout:Dialogs

Q2:
If the Q*Layouts now use the style defaults, is there a need for the 
KDialog::*Hints() at all? So should these functions be better set to 
Deprecated? And groupSpacingHint() be removed again, before the 4.2 release?
And should all usages of these functions then be removed, as they only reset 
the margins/spacings to values they already have?

If you get no real answer to your patch here, perhaps you can go for some 
people more aesthetically interested and experienced with KStyle code in the 
mailinglist kde-artists. :)

Cheers
Friedrich
-- 
Okteta - KDE 4 Hex Editor - http://utils.kde.org/projects/okteta




More information about the kde-core-devel mailing list