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

Marco Martin notmart at gmail.com
Tue Dec 18 17:57:28 CET 2007


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:)

>
> btw.. it pains me to be so anal about this because the content is good and
> i hate to keep harping on style as if matters more than the content ..
> but.. yeah..
no problem, honey :P
>
> +    }else{
> +        iconWidth = size().height()
> +         - d->verticalMargin[Private::IconMargin].top
> +         - d->verticalMargin[Private::IconMargin].bottom;
> +    }
>
> should be
>
> +    } else {
> +        iconWidth = size().height() -
> +                    d->verticalMargin[Private::IconMargin].top -
> +                    d->verticalMargin[Private::IconMargin].bottom;
> +    }
done
> (he says, hoping people don't get tired of the "i'd really like a
> semi-consistent code base" bit ;)

Cheers,
Marco Martin



More information about the Panel-devel mailing list