[Panel-devel] [PATCH] Plasma::icon resizing

Aaron J. Seigo aseigo at kde.org
Wed Dec 19 15:53:37 CET 2007


On Wednesday 19 December 2007, Marco Martin wrote:
> On Wednesday 19 December 2007, Aaron J. Seigo wrote:
> > On Tuesday 18 December 2007, Marco Martin wrote:
> > > On Tuesday 18 December 2007, Aaron J. Seigo wrote:
> > > > On Tuesday 18 December 2007, Jason Stubbs wrote:
> > > > > On Tuesday 18 December 2007 03:48:42 Marco Martin wrote:
> > > > > > Hi,
> > > > > > this patch makes the icons to resize when the applet is resized,
> > > > > > and sized small enough to leave room for the text label.
> > > > > > how does it look?
> > > > >
> > > > > Wow! Less code than I thought it would take.
> > > > >
> > > > > I tested by adding labels on to the icons for the lock/logout
> > > > > widget. You'll need to remove expandingDirections() so that the
> > > > > icon will expand when in a layout too. Also, there doesn't seem to
> > > > > be quite enough room for the text as well. But it's close. :)
> > > >
> > > > and then you can commit; good work to everyone working on the icon
> > > > issues =)
> > >
> > > Plasma::Icon is my favourite foe:)
> >
> > testing this now i see that there are some remaining problems, at least
> > when the icons are used in the Url widget; i haven't tested them
> > separately.
> >
> > the issue is that when there is more vertical space than necessary, the
> > text is far below the icon. it should be snugged up.
> >
> > it might be useful if Plasma::Icon could return an "optimal" size based
> > on text width and overall height (e.g. if the height given in N, then the
> > icon will be X pixels high and the text Y pixels in height meaning that
> > N-(X+Y) is really the height that should be used ...)
>
> so i would say an height sufficient to contain the text and no more and a
> width enough to have room for a medium-lenght filename.

perfect.

> how to connect that optimal size (sizeHint()?) to the containig applet? at
> the moment it always has the aspect ratio that is set by
> setMinimumContentSize

right... i address this in my email on this topic i just sent to the other 
thread =)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071219/b09e347e/attachment.pgp 


More information about the Panel-devel mailing list