[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Problem to use PopupApplet
From:       Charles Wautier <p3ti7.pr1nce () gmail ! com>
Date:       2009-09-24 8:03:24
Message-ID: 437a2f810909240103q186c2f2al7ed2b303414df108 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


2009/9/22 Aaron J. Seigo <aseigo@kde.org>

> hi Charles;
>
> let's keep this on plasma-devel@kde.org.
>
> On September 21, 2009, Charles Wautier wrote:
> > 2009/9/21 Aaron J. Seigo <aseigo@kde.org>
> >
> > > On September 21, 2009, Charles Wautier wrote:
> > > > What makes this plasmoid unusual is that the Popup showing/hiding is
> > > > not controlled by an icon as it's supposed to be, but by a click on
> the
> > >
> > > label.
> > >
> > > > To realize that, I tricked, by not setting the PopupIcon (with
> > > >  setPopupIcon) as I'm supposed to do (a known trick on #plasma)
> > >
> > > technically, it's not a trick :)
> > >
> > > > The problem is : it seems that this trick has undesirable
> side-effects
> > > > : 1/ When the plasmoid just have been started, the first click on the
> > > > label show the menu but hide it right away. Then the behaviour become
> > > > normal.
> > >
> > > sounds like a bug in your code, or something we haven't made obvious
> > > enough in
> > > the API.
> > >
> > > you can either override the mousePressEvent in your applet itself or,
> if
> > > the
> > > label in your plasmoid is a separate widget then simply call showPopup
> > > when it's clicked.
> >
> > That is exactly what I do (slot which shows a popup ; its never called -
> > maybe because I choose a wrong signal *
>
> yes, this would be a bug in your code somewhere.
>
> > - but anyway, the popup does appear
> > when clicking on any surface outside the button (c.f. screenshot))
>
> that would be because PopupApplet provides that for you. you can override
> mousePressEvent in your PopupApplet subclass to prevent that.
>
> > > > 2/ When resizing, the mouse cursor keeps the form of the
> > > > resizing-double-arrow even when we hover the popup
> > >
> > > when resizing what, the applet?
> >
> > When I resize the Popup, so the cursor is transformed in double-arrow,
> the
> > cursor keeps this form when I finish resizing (button released).
>
> i can't confirm this with other PopupApplets. does this only happen for you
> with your own applet?
>
> > > it keeps the resize cursor even after you
> > > stop resizing? because resizing the applet continues until you let go
> of
> > > the
> > > mouse button, even if the cursor passes over another window.
> > >
> > > > 3/ The scroll bars are ugly
> > >
> > > which scroll bars?
> >
> > the scrollbars of the popup (which contains a treeview) when the size is
> >  too short : they are different of what they should be (deep black
> >  background and grey scroll)
>
> we don't re-style all scrollbars from all QWidgets put into
> QGraphicsProxyWidgets. so that is to be expected. one needs to either use a
> proper QGraphicsWidget or live with some odd ugliness here and there.
>
> > What is curious is : if I remove the code concerning the Applet itself
> > (opposed to the Popup), and I set an Icon, those bugs disappear.
>
> yes, sounds like bugs in your code. unfortunately i don't have time to
> review
> your code line by line and debug it with/for you, but if you can provide
> simple test cases that do show bugs in libplasa i'm more than happy to
> address
> those on a case by case basis.
>

I made more tests on the plasmoid, and indeed the popup opens correctly if I
change the widget it is supposed to display, so I guess the fault rewards to
my original widget. The graphic enhancement I observed when setting an icon
are only visible with the plasmoidviewer, but not when the plasmoid is in
KDE environnement, so I suppose it was just an illusion.
Thus I observed what you said :  plasmoid has no responsability in those
bugs, and I'll go back searching :)

Thanks for your help !

>
> --
> 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 Qt Development Frameworks
>

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">2009/9/22 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;"> hi Charles;<br>
<br>
let&#39;s keep this on <a \
href="mailto:plasma-devel@kde.org">plasma-devel@kde.org</a>.<br> <div class="im"><br>
On September 21, 2009, Charles Wautier wrote:<br>
&gt; 2009/9/21 Aaron J. Seigo &lt;<a \
href="mailto:aseigo@kde.org">aseigo@kde.org</a>&gt;<br> &gt;<br>
&gt; &gt; On September 21, 2009, Charles Wautier wrote:<br>
&gt; &gt; &gt; What makes this plasmoid unusual is that the Popup showing/hiding \
is<br> &gt; &gt; &gt; not controlled by an icon as it&#39;s supposed to be, but by a \
click on the<br> &gt; &gt;<br>
&gt; &gt; label.<br>
&gt; &gt;<br>
&gt; &gt; &gt; To realize that, I tricked, by not setting the PopupIcon (with<br>
&gt; &gt; &gt;  setPopupIcon) as I&#39;m supposed to do (a known trick on \
#plasma)<br> &gt; &gt;<br>
&gt; &gt; technically, it&#39;s not a trick :)<br>
&gt; &gt;<br>
&gt; &gt; &gt; The problem is : it seems that this trick has undesirable \
side-effects<br> &gt; &gt; &gt; : 1/ When the plasmoid just have been started, the \
first click on the<br> &gt; &gt; &gt; label show the menu but hide it right away. \
Then the behaviour become<br> &gt; &gt; &gt; normal.<br>
&gt; &gt;<br>
&gt; &gt; sounds like a bug in your code, or something we haven&#39;t made \
obvious<br> &gt; &gt; enough in<br>
&gt; &gt; the API.<br>
&gt; &gt;<br>
&gt; &gt; you can either override the mousePressEvent in your applet itself or, \
if<br> &gt; &gt; the<br>
&gt; &gt; label in your plasmoid is a separate widget then simply call showPopup<br>
&gt; &gt; when it&#39;s clicked.<br>
&gt;<br>
&gt; That is exactly what I do (slot which shows a popup ; its never called -<br>
&gt; maybe because I choose a wrong signal *<br>
<br>
</div>yes, this would be a bug in your code somewhere.<br>
<div class="im"><br>
&gt; - but anyway, the popup does appear<br>
&gt; when clicking on any surface outside the button (c.f. screenshot))<br>
<br>
</div>that would be because PopupApplet provides that for you. you can override<br>
mousePressEvent in your PopupApplet subclass to prevent that.<br>
<div class="im"><br>
&gt; &gt; &gt; 2/ When resizing, the mouse cursor keeps the form of the<br>
&gt; &gt; &gt; resizing-double-arrow even when we hover the popup<br>
&gt; &gt;<br>
&gt; &gt; when resizing what, the applet?<br>
&gt;<br>
&gt; When I resize the Popup, so the cursor is transformed in double-arrow, the<br>
&gt; cursor keeps this form when I finish resizing (button released).<br>
<br>
</div>i can&#39;t confirm this with other PopupApplets. does this only happen for \
you<br> with your own applet?<br>
<div class="im"><br>
&gt; &gt; it keeps the resize cursor even after you<br>
&gt; &gt; stop resizing? because resizing the applet continues until you let go \
of<br> &gt; &gt; the<br>
&gt; &gt; mouse button, even if the cursor passes over another window.<br>
&gt; &gt;<br>
&gt; &gt; &gt; 3/ The scroll bars are ugly<br>
&gt; &gt;<br>
&gt; &gt; which scroll bars?<br>
&gt;<br>
&gt; the scrollbars of the popup (which contains a treeview) when the size is<br>
&gt;  too short : they are different of what they should be (deep black<br>
&gt;  background and grey scroll)<br>
<br>
</div>we don&#39;t re-style all scrollbars from all QWidgets put into<br>
QGraphicsProxyWidgets. so that is to be expected. one needs to either use a<br>
proper QGraphicsWidget or live with some odd ugliness here and there.<br>
<div class="im"><br>
&gt; What is curious is : if I remove the code concerning the Applet itself<br>
&gt; (opposed to the Popup), and I set an Icon, those bugs disappear.<br>
<br>
</div>yes, sounds like bugs in your code. unfortunately i don&#39;t have time to \
review<br> your code line by line and debug it with/for you, but if you can \
provide<br> simple test cases that do show bugs in libplasa i&#39;m more than happy \
to address<br> those on a case by case basis.<br></blockquote><div><br>I made more \
tests on the plasmoid, and indeed the popup opens correctly if I change the widget it \
is supposed to display, so I guess the fault rewards to my original widget. The \
graphic enhancement I observed when setting an icon are only visible with the \
plasmoidviewer, but not when the plasmoid is in KDE environnement, so I suppose it \
was just an illusion. <br> Thus I observed what you said :  plasmoid has no \
responsability in those bugs, and I&#39;ll go back searching :)<br><br>Thanks for \
your help ! <br></div><blockquote class="gmail_quote" style="border-left: 1px solid \
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">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 Qt Development Frameworks<br>
</div></div></blockquote></div><br>



_______________________________________________
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