KStyle and iconSize

David Faure faure at kde.org
Wed Dec 13 22:21:47 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);
(which is not even the right default value, in qt-4.2 is has become QStyle::PM_ButtonIconSize for buttons).
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?).

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kstyle_iconsize.diff
Type: text/x-diff
Size: 4110 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20061213/0ca10276/attachment.diff>


More information about the kde-core-devel mailing list