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

Craig Duquette cduquette at gmail.com
Mon Dec 31 20:52:02 CET 2007


Well I included it because I was getting a 1px icon instead of the
actual image by not using setMinimum, not sure if it's a bug with
Plasma::Icon, but the way I see it's better to limit the icon from
being a size other than we intended :).

Here's my latest patch that plays with the gradient. And some screenshot love :D

Closed: http://img185.imageshack.us/my.php?image=tool1uj5.png
Expanded: http://img185.imageshack.us/my.php?image=tool2rr7.png

And this is my current desktop shot of kde4.
http://home.cfl.rr.com/gamma/images/ss.png

Great work Oxygen folks! :D

On 12/28/07, Alex Merry <alexander.merry at ccc.ox.ac.uk> wrote:
> 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: icons-123007.patch
Type: text/x-patch
Size: 4502 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071231/e7b36487/attachment-0001.bin 


More information about the Panel-devel mailing list