A screen shot and a question

Marco Martin notmart at gmail.com
Tue Sep 16 15:43:43 CEST 2008


On Tuesday 16 September 2008, Aaron J. Seigo wrote:
> On Tuesday 16 September 2008, Marco Martin wrote:
> > On Tuesday 16 September 2008, Dong Tiger wrote:
> > > Hi all,
> > >
> > > I tried to make Google Gadgets(GG in short) to work on plasma panel.
> > > Here is a screen shot of a vertical panel with 3 GGs. But there are
> > > still issues remain:
> > >
> > > 1. It doesn't work on horizontal panel. When added to horizontal panel,
> > > the applet gets a 'invalid' constraintsEvent with width constaint of 9
> > > ( In my case).
>
> it's not invalid; it's an or'd value, in this case SizeConstraint |
> FormFactorConstraint
>
> > > So the embedded GG just doesn't show up at all.
> >
> > strange, you are getting a SizeConstraint combined with a
> > FormFactorConstraint,
>
> not strange: it's added to a panel, so it changes size and form factor.

was saying strange that doesn't work in fact :)
> > > 2. I can't adjust the size of an applet when it's on panel. I am using
> > > Plasma::ConstrainedSquare for these applets.
> >
> > constrainedSquare means that the applet for instance in an horizontal
> > panel can have a width at max equal to the panel height, but can be
> > automatically resized by the panel layout. in general you can't never
> > ever call resize() in the constraintevent when you are in the panel (or
> > in a layout in general) because it would collide with the automatic
> > layout resize, thus causing an infinite loop of resizing and 100%cpu
> > usage...
> >
> > to set the size in a panel you should make it IgnoreAspectRatio and then
> > set minimum and maximum sizes, but this is quite ugly and error prone
> > when the panel switches run-time from vertical to horizontal.
>
> can't you just reimplement sizeHint and return different values based on
> formFactor()?
also, yeah, didn't immediately tought to that:) it's how constrainedsquare 
works for instance



More information about the Plasma-devel mailing list