KStyle and iconSize
Maksim Orlovich
mo85 at cornell.edu
Thu Dec 14 18:37:09 GMT 2006
> 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.
> (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..
> 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?
Thanks,
Maks
More information about the kde-core-devel
mailing list