2008/9/16 Aaron J. Seigo <[EMAIL PROTECTED]> > 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. > > > > 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()?
I am using AppletScript so I can't reimplement sizeHint :( > > > -- > 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 > > > _______________________________________________ > Plasma-devel mailing list > Plasma-devel@kde.org > https://mail.kde.org/mailman/listinfo/plasma-devel > >
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel