From kde-panel-devel Wed Sep 29 17:00:43 2010 From: "Aaron Seigo" Date: Wed, 29 Sep 2010 17:00:43 +0000 To: kde-panel-devel Subject: Re: Review Request: Make kolourpicker color grab working from Message-Id: <20100929170043.19748.21174 () vidsolbach ! de> X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=128578139310648 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1933260426==" --===============1933260426== Content-Type: multipart/alternative; boundary="===============7162744138963914505==" --===============7162744138963914505== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://svn.reviewboard.kde.org/r/5465/#review7884 ----------------------------------------------------------- Ship it! looks good, though the patch looks like it hasn't been tidied up for commit= yet. the code itself looks good, though, so just tidy it up and commit. ni= cely done! /trunk/KDE/kdeplasma-addons/applets/kolourpicker/kolourpicker.h delete the line before committing :) /trunk/KDE/kdeplasma-addons/applets/kolourpicker/kolourpicker.cpp watch the whitespace :) /trunk/KDE/kdeplasma-addons/applets/kolourpicker/kolourpicker.cpp delete before commit - Aaron On 2010-09-28 10:01:19, Bj=C3=B6rn Ruberg wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://svn.reviewboard.kde.org/r/5465/ > ----------------------------------------------------------- > = > (Updated 2010-09-28 10:01:19) > = > = > Review request for Plasma. > = > = > Summary > ------- > = > Patch fixes the bug that the mouse grab of the color-picker goes away whe= n the panel hides. The idea of initiating the grab not on the panel but on = a self created widget is from ksnapshot. > I want someone to look at it because I want to commit it KDE 4.5 branch a= s a bugfix. > = > = > This addresses bug 252350. > https://bugs.kde.org/show_bug.cgi?id=3D252350 > = > = > Diffs > ----- > = > /trunk/KDE/kdeplasma-addons/applets/kolourpicker/kolourpicker.h 1180054 = > /trunk/KDE/kdeplasma-addons/applets/kolourpicker/kolourpicker.cpp 11800= 54 = > = > Diff: http://svn.reviewboard.kde.org/r/5465/diff > = > = > Testing > ------- > = > Had kolourpicker in an autohiding panel - and it suddenly works. Tested w= ith an applet on the desktop too. Works. > = > = > Thanks, > = > Bj=C3=B6rn > = > --===============7162744138963914505== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
This is an automatically generated e-mail. To reply, visit: http://svn.reviewb= oard.kde.org/r/5465/

Ship it!

looks good=
, though the patch looks like it hasn't been tidied up for commit yet. =
the code itself looks good, though, so just tidy it up and commit. nicely d=
one!

= =
/trunk/KDE/kdeplas= ma-addons/applets/kolourpicker/kolourpicker.h (Diff revision 1)
class Kolourpicker : public Plasma::Applet
40
        virtual bool sceneEventFilter(QGraphicsItem *=
watched, QEvent *event);
40
        =
//virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *even=
t);
delete the line before committing :)

= =
/trunk/KDE/kdepla= sma-addons/applets/kolourpicker/kolourpicker.cpp (Diff revision 1)
Kolourpicker::Kolourpicker(QObject *parent, const QVariantList &=
;args)
161
    
162
    m_grabWidget =3D new QWi=
dget( 0,  Qt::X11BypassWindowManagerHint );
163
    m_grabWidget->move( -1000, -1000 );
watch the whitespace :)

= = = = = =
/trunk/KDE/kdepla= sma-addons/applets/kolourpicker/kolourpicker.cpp (Diff revision 1)
bool Kolourpicker::sceneEventFilter(QGraphicsItem *watched, QEvent =
*event)
259
bool Kolourpicker::sceneEve=
ntFilter(QGraphicsItem *watched, QEvent *<=
span class=3D"n">event)
263
/*bool Kolourpicker::sceneEventFilter(QGraphicsItem *watched, QEvent *event)=
260
{
264
{
261
    if (watched =3D=3D m_grabButton &&=
 event->type() =3D=3D =
QEvent::GraphicsSceneMouseRelease)
265
    if (watched =3D=3D m_gr=
abButton && event->type() =3D=3D QEvent::GraphicsSceneMouseRelea=
se)
262
    {
266
    {
263
        m_grabWidget =
=3D static_cast<QGraphicsSceneMouseEvent *>(event)->widget();
267
        m_grabWidget =3D st=
atic_cast<QGraphicsSceneMouseEvent *>(event)->widget();
264
        if (m_grabWidget &am=
p;& m_grabWidget->=
parentWidget()) {
268
        if (m_grabWidget &a=
mp;& m_grabWidget->parentWidget()) {
265
            m_grabWidget =3D m_grabWidget->parentWidget();
269
            m_grabWidget =
=3D m_grabWidget->parentWidget();
266
        }
270
        }
267
271
268
        if (m_grabWidget) {
272
        if (m_grabWidget) {=
269
            m_grabWidget->installEventFilter(this)=
;
273
            m_grabWidget-&g=
t;installEventFilter(this);
270
        }
274
        }
271
    }
275
    }
272
    return false;
276
    return false;
273
}
277
}*/
delete before commit

- Aaron


On September 28th, 2010, 10:01 a.m., Bj=C3=B6rn Ruberg wrote:

Review request for Plasma.
By Bj=C3=B6rn Ruberg.

Updated 2010-09-28 10:01:19

Descripti= on

Patch fixes the bug that the mouse grab of the color-picker =
goes away when the panel hides. The idea of initiating the grab not on the =
panel but on a self created widget is from ksnapshot.
I want someone to look at it because I want to commit it KDE 4.5 branch as =
a bugfix.

Testing <= /h1>
Had kolourpicker in an autohiding panel - and it suddenly wo=
rks. Tested with an applet on the desktop too. Works.
Bugs: 252350

Diffs=

  • /trunk/KDE/kdeplasma-addons/applets/kolourpicker/kolourpicker.h (1180054)
  • /trunk/KDE/kdeplasma-addons/applets/kolourpicker/kolourpicker.cpp (1180054)

View Diff

--===============7162744138963914505==-- --===============1933260426== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============1933260426==--