[Panel-devel] patch: icon size

Matt Broadstone mbroadst at gmail.com
Tue Aug 7 22:59:44 CEST 2007


On 8/7/07, M. Costa <m.costacano at gmail.com> wrote:
> This patch removes the need of a QStyleOptionGraphicsItem to calculate the
> geometry of a "not painted yet" Icon. With it the following makeSomething
> works
>
> Icon *icon = new Icon("some text", this);
> makeSomething(icon->geometry()); // ok
>
> Now the geometry returns 140.8x140.8 witch is the 128*1.1 set in the
> constructor.
>
> Why Icon::size() always returns -1,-1?
> Why are there size() geometry() and boundingRect()?
>
No dice, you can't just remove the style option from being passed
around, though currently we aren't using most of the options provided
by it, its going to be needed to get direction information, and
possibly new information passed with it in upcoming point releases.

The problem you are really trying to solve is that calculateSize isn't
called until a paint is called on the object (its done this way so we
can actually get a style option passed into it). Talk to me on irc and
we can try to resolve this. As it is, this patch is no good.

Matt

> _______________________________________________
> Panel-devel mailing list
> Panel-devel at kde.org
> https://mail.kde.org/mailman/listinfo/panel-devel
>
>
>


More information about the Panel-devel mailing list