From kde-panel-devel Tue Aug 07 20:59:44 2007 From: "Matt Broadstone" Date: Tue, 07 Aug 2007 20:59:44 +0000 To: kde-panel-devel Subject: Re: [Panel-devel] patch: icon size Message-Id: <621909c70708071359k68156e26qfdc1e21d7251552f () mail ! gmail ! com> X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=118652042512018 On 8/7/07, M. Costa 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@kde.org > https://mail.kde.org/mailman/listinfo/panel-devel > > > _______________________________________________ Panel-devel mailing list Panel-devel@kde.org https://mail.kde.org/mailman/listinfo/panel-devel