From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R7DMF-0001zR-FG for garchives@archives.gentoo.org; Fri, 23 Sep 2011 21:32:31 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0366D21C291; Fri, 23 Sep 2011 21:32:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B78C021C291 for ; Fri, 23 Sep 2011 21:32:07 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EB5341B403F for ; Fri, 23 Sep 2011 21:32:06 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2276) id 9F57F2004C; Fri, 23 Sep 2011 21:32:05 +0000 (UTC) From: "Andreas HAttel (dilfridge)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, dilfridge@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in kde-base/kdelibs/files: kdelibs-4.7.1-clearbutton.patch X-VCS-Repository: gentoo-x86 X-VCS-Files: kdelibs-4.7.1-clearbutton.patch X-VCS-Directories: kde-base/kdelibs/files X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas HAttel Content-Type: text/plain; charset=utf8 Message-Id: <20110923213205.9F57F2004C@flycatcher.gentoo.org> Date: Fri, 23 Sep 2011 21:32:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 97c681b35135a9a39d134943cd1af2e9 dilfridge 11/09/23 21:32:05 Added: kdelibs-4.7.1-clearbutton.patch Log: Beautifying-the-clearbutton revbump =20 (Portage version: 2.1.10.19/cvs/Linux x86_64) Revision Changes Path 1.1 kde-base/kdelibs/files/kdelibs-4.7.1-clearbutton.pat= ch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kdelibs/f= iles/kdelibs-4.7.1-clearbutton.patch?rev=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kdelibs/f= iles/kdelibs-4.7.1-clearbutton.patch?rev=3D1.1&content-type=3Dtext/plain Index: kdelibs-4.7.1-clearbutton.patch =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D commit 07d20a558da67fb9f849e2b20c52cf275ea01794 Author: Andrea Iacovitti Date: Sat Sep 17 10:12:04 2011 +0200 -Do not set WA_OpaquePaintEvent attribute for line edit clearButton (should fix the not transparent background bug) -Optimize a bit the code to enable/disable it =20 BUG: 230024 CCBUG: 280226 FIXED-IN: 4.7.2 diff --git a/kdeui/widgets/klineedit.cpp b/kdeui/widgets/klineedit.cpp index 715e182..c919b99 100644 --- a/kdeui/widgets/klineedit.cpp +++ b/kdeui/widgets/klineedit.cpp @@ -291,6 +291,7 @@ void KLineEdit::setClearButtonShown(bool show) } =20 d->clearButton =3D new KLineEditButton(this); + d->clearButton->setObjectName("KLineEditButton"); d->clearButton->setCursor( Qt::ArrowCursor ); d->clearButton->setToolTip( i18nc( "@action:button Clear current= text in the line edit", "Clear text" ) ); =20 diff --git a/khtml/khtmlview.cpp b/khtml/khtmlview.cpp index 1db9b1a..28dbac3 100644 --- a/khtml/khtmlview.cpp +++ b/khtml/khtmlview.cpp @@ -1363,7 +1363,7 @@ void KHTMLView::mouseMoveEvent( QMouseEvent * _mous= e ) if (kw && kw->m_kwp->isRedirected()) setCursor =3D false; else if (QLineEdit* le =3D qobject_cast(rw->widget()= )) { - QList wl =3D qFindChildren( le, "KHTMLL= ineEditButton" ); + QList wl =3D qFindChildren( le, "KLineE= ditButton" ); // force arrow cursor above lineedit clear button foreach (QWidget*w, wl) { if (w->underMouse()) { @@ -1942,7 +1942,10 @@ static void handleWidget(QWidget* w, KHTMLView* vi= ew, bool recurse=3Dtrue) w->setAttribute( Qt::WA_NoSystemBackground ); =20 w->setAttribute(Qt::WA_WState_InPaintEvent); - w->setAttribute(Qt::WA_OpaquePaintEvent); + + if (!(w->objectName() =3D=3D "KLineEditButton")) + w->setAttribute(Qt::WA_OpaquePaintEvent); + w->installEventFilter(view); =20 if (!recurse) diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_for= m.cpp index 845db1a..3302920 100644 --- a/khtml/rendering/render_form.cpp +++ b/khtml/rendering/render_form.cpp @@ -1044,20 +1044,21 @@ void RenderLineEdit::setStyle(RenderStyle* _style= ) RenderFormElement::setStyle( _style ); =20 widget()->setAlignment(textAlignment()); + bool showClearButton =3D (!shouldDisableNativeBorders() && !_style->= hasBackgroundImage()); - widget()->setClearButtonShown( showClearButton ); - if (showClearButton) { + + if (!showClearButton && widget()->isClearButtonShown()) { + widget()->setClearButtonShown(false); + } + else if (showClearButton && !widget()->isClearButtonShown()) { + widget()->setClearButtonShown(true); QObjectList children =3D widget()->children(); foreach (QObject* object, children) { QWidget *w =3D qobject_cast(object); - if (w && !w->isWindow()) { + if (w && !w->isWindow() && (w->objectName() =3D=3D "KLineEdi= tButton")) { // this duplicates KHTMLView's handleWidget but this wid= get // is created on demand, so it might not be here at Chil= dPolished time - w->setObjectName("KHTMLLineEditButton"); w->installEventFilter(view()); - w->setAttribute(Qt::WA_NoSystemBackground); - w->setAttribute(Qt::WA_WState_InPaintEvent); - w->setAttribute(Qt::WA_OpaquePaintEvent); } } }