[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">&lt;<a href="mailto:aseigo@kde.org">aseigo@kde.org</a>&gt;</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> &gt; On Tuesday 16 September 2008, Dong Tiger wrote:<br>
&gt; &gt; Hi all,<br>
&gt; &gt;<br>
&gt; &gt; I tried to make Google Gadgets(GG in short) to work on plasma panel. \
Here<br> &gt; &gt; is a screen shot of a vertical panel with 3 GGs. But there are \
still<br> &gt; &gt; issues remain:<br>
&gt; &gt;<br>
&gt; &gt; 1. It doesn&#39;t work on horizontal panel. When added to horizontal \
panel,<br> &gt; &gt; the applet gets a &#39;invalid&#39; constraintsEvent with width \
constaint of 9 (<br> &gt; &gt; In my case).<br>
<br>
</div>it&#39;s not invalid; it&#39;s an or&#39;d value, in this case SizeConstraint \
|<br> FormFactorConstraint<br>
<div class="Ih2E3d"><br>
&gt; &gt; So the embedded GG just doesn&#39;t show up at all.<br>
&gt;<br>
&gt; strange, you are getting a SizeConstraint combined with a<br>
&gt; FormFactorConstraint,<br>
<br>
</div>not strange: it&#39;s added to a panel, so it changes size and form factor.<br>
<div class="Ih2E3d"><br>
&gt; &gt; 2. I can&#39;t adjust the size of an applet when it&#39;s on panel. I am \
using<br> &gt; &gt; Plasma::ConstrainedSquare for these applets.<br>
&gt;<br>
&gt; constrainedSquare means that the applet for instance in an horizontal panel<br>
&gt; can have a width at max equal to the panel height, but can be automatically<br>
&gt; resized by the panel layout. in general you can&#39;t never ever call \
resize()<br> &gt; in the constraintevent when you are in the panel (or in a layout \
in<br> &gt; general) because it would collide with the automatic layout resize, \
thus<br> &gt; causing an infinite loop of resizing and 100%cpu usage...<br>
&gt;<br>
&gt; to set the size in a panel you should make it IgnoreAspectRatio and then<br>
&gt; set minimum and maximum sizes, but this is quite ugly and error prone when<br>
&gt; the panel switches run-time from vertical to horizontal.<br>
<br>
</div>can&#39;t you just reimplement sizeHint and return different values based \
on<br> formFactor()?</blockquote><div>I am using AppletScript so I can&#39;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 &nbsp;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