[Panel-devel] [PATCH] Smaller toolbox with icons

Alex Merry alexander.merry at ccc.ox.ac.uk
Fri Dec 28 14:01:50 CET 2007


On Fri, Dec 28, 2007 at 05:32:23PM +0900, Jason Stubbs wrote:
> One tiny nit-picky thing so no need to repost a patch, but:
> 
> +    tool->setMinimumSize(iconSize);
> +    tool->setMaximumSize(iconSize);
> +    tool->resize(tool->sizeHint());
> 
> Is there any reason to not use iconSize rather than tool->sizeHint() ? I'm 
> guessing that it returns the same value anyway, but looks out of place and 
> begs the eternal question "why is it so?" ;)

Actually, tool->sizeHint() for Plasma::Icon returns the last value
passed to tool->resize().  My approach was to do
tool->resize(tool->sizeFromIconSize(iconSize));

That should work as a replacement for the above three lines.  I think
setMinimumSize and setMaximumSize can be discarded, as there's no
layouts doing anything.

Alex

-- 
KDE: http://www.kde.org
OpenSUSE: http://www.opensuse.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071228/889c465a/attachment.pgp 


More information about the Panel-devel mailing list