[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"><<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;"> hi Charles;<br>
<br>
let'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>
> 2009/9/21 Aaron J. Seigo <<a \
href="mailto:aseigo@kde.org">aseigo@kde.org</a>><br> ><br>
> > On September 21, 2009, Charles Wautier wrote:<br>
> > > What makes this plasmoid unusual is that the Popup showing/hiding \
is<br> > > > not controlled by an icon as it's supposed to be, but by a \
click on the<br> > ><br>
> > label.<br>
> ><br>
> > > To realize that, I tricked, by not setting the PopupIcon (with<br>
> > > setPopupIcon) as I'm supposed to do (a known trick on \
#plasma)<br> > ><br>
> > technically, it's not a trick :)<br>
> ><br>
> > > The problem is : it seems that this trick has undesirable \
side-effects<br> > > > : 1/ When the plasmoid just have been started, the \
first click on the<br> > > > label show the menu but hide it right away. \
Then the behaviour become<br> > > > normal.<br>
> ><br>
> > sounds like a bug in your code, or something we haven't made \
obvious<br> > > enough in<br>
> > the API.<br>
> ><br>
> > you can either override the mousePressEvent in your applet itself or, \
if<br> > > the<br>
> > label in your plasmoid is a separate widget then simply call showPopup<br>
> > when it's clicked.<br>
><br>
> That is exactly what I do (slot which shows a popup ; its never called -<br>
> 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>
> - but anyway, the popup does appear<br>
> 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>
> > > 2/ When resizing, the mouse cursor keeps the form of the<br>
> > > resizing-double-arrow even when we hover the popup<br>
> ><br>
> > when resizing what, the applet?<br>
><br>
> When I resize the Popup, so the cursor is transformed in double-arrow, the<br>
> cursor keeps this form when I finish resizing (button released).<br>
<br>
</div>i can't confirm this with other PopupApplets. does this only happen for \
you<br> with your own applet?<br>
<div class="im"><br>
> > it keeps the resize cursor even after you<br>
> > stop resizing? because resizing the applet continues until you let go \
of<br> > > the<br>
> > mouse button, even if the cursor passes over another window.<br>
> ><br>
> > > 3/ The scroll bars are ugly<br>
> ><br>
> > which scroll bars?<br>
><br>
> the scrollbars of the popup (which contains a treeview) when the size is<br>
> too short : they are different of what they should be (deep black<br>
> background and grey scroll)<br>
<br>
</div>we don'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>
> What is curious is : if I remove the code concerning the Applet itself<br>
> (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'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'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'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