[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: A screen shot and a question
From: "Dong Tiger" <idlecat511 () gmail ! com>
Date: 2008-09-17 4:20:38
Message-ID: cba868840809162120l6cb5d765p68aa7031284b4c87 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
2008/9/16 Aaron J. Seigo <aseigo@kde.org>
> 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
>
>
[Attachment #5 (text/html)]
<div dir="ltr"><br><br><div class="gmail_quote">2008/9/16 Aaron J. Seigo <span \
dir="ltr"><<a href="mailto:aseigo@kde.org">aseigo@kde.org</a>></span><br><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> <div class="Ih2E3d">On Tuesday 16 September 2008, \
Marco Martin wrote:<br> > On Tuesday 16 September 2008, Dong Tiger wrote:<br>
> > Hi all,<br>
> ><br>
> > I tried to make Google Gadgets(GG in short) to work on plasma panel. \
Here<br> > > is a screen shot of a vertical panel with 3 GGs. But there are \
still<br> > > issues remain:<br>
> ><br>
> > 1. It doesn't work on horizontal panel. When added to horizontal \
panel,<br> > > the applet gets a 'invalid' constraintsEvent with width \
constaint of 9 (<br> > > In my case).<br>
<br>
</div>it's not invalid; it's an or'd value, in this case SizeConstraint \
|<br> FormFactorConstraint<br>
<div class="Ih2E3d"><br>
> > So the embedded GG just doesn't show up at all.<br>
><br>
> strange, you are getting a SizeConstraint combined with a<br>
> FormFactorConstraint,<br>
<br>
</div>not strange: it's added to a panel, so it changes size and form factor.<br>
<div class="Ih2E3d"><br>
> > 2. I can't adjust the size of an applet when it's on panel. I am \
using<br> > > Plasma::ConstrainedSquare for these applets.<br>
><br>
> constrainedSquare means that the applet for instance in an horizontal panel<br>
> can have a width at max equal to the panel height, but can be automatically<br>
> resized by the panel layout. in general you can't never ever call \
resize()<br> > in the constraintevent when you are in the panel (or in a layout \
in<br> > general) because it would collide with the automatic layout resize, \
thus<br> > causing an infinite loop of resizing and 100%cpu usage...<br>
><br>
> to set the size in a panel you should make it IgnoreAspectRatio and then<br>
> set minimum and maximum sizes, but this is quite ugly and error prone when<br>
> the panel switches run-time from vertical to horizontal.<br>
<br>
</div>can't you just reimplement sizeHint and return different values based \
on<br> formFactor()?</blockquote><div>I am using AppletScript so I can't \
reimplement sizeHint :(<br></div><blockquote class="gmail_quote" style="border-left: \
1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br>
<font color="#888888"><br>
--<br>
Aaron J. Seigo<br>
humru othro a kohnu se<br>
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43<br>
<br>
KDE core developer sponsored by Trolltech<br>
<br>
</font><br>_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br> \
<br></blockquote></div><br></div>
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic