KStyle and iconSize
David Faure
faure at kde.org
Thu Dec 14 21:52:32 GMT 2006
On Thursday 14 December 2006 19:37, Maksim Orlovich wrote:
> > KStyle doesn't seem to honour the iconSize passed by QAbstractButton, so
> > right now myPushButton->setIconSize(sz) does nothing.
>
> > I tried to fix it with the patch below, but that's only for the
> > computations; the painting still hardcodes PM_SmallIconSize:
> > at /d/kde/src/4/kdelibs/kdefx/kstyle.cpp:468
> > 468 QPixmap icon =
> > iconOpts->icon.pixmap(pixelMetric(PM_SmallIconSize), mode);
>
> Good catch. Thanks. Same with radio buttons and checkboxes, actually.
Yep, my patch starts fixing it for all three of them. Smells a little bit of code duplication btw ;)
> > (which is not even the right default value, in qt-4.2 is has become
> > QStyle::PM_ButtonIconSize for buttons).
>
> Well, this was written way before Qt 4.2..
I know ;)
> > In any case the opt->iconSize should be passed down to this method, but
> > that's where I have to stop, confused
> > by KStyle::IconOption (should the iconSize be added to that one?).
>
> Yep. Do you want me to make that change?
Yes, please do. Thanks!
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list