[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/libs/plasma/widgets
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2008-01-12 5:32:08
Message-ID: 1200115928.414106.17656.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 760180 by aseigo:
in case a tooltip becomes permanent, allow clicking it away
M +8 -0 tooltip.cpp
M +2 -1 tooltip_p.h
--- trunk/KDE/kdebase/workspace/libs/plasma/widgets/tooltip.cpp #760179:760180
@@ -22,6 +22,7 @@
#include <QBitmap>
#include <QHBoxLayout>
#include <QLabel>
+#include <QMouseEvent>
#include <QPixmap>
#include <QTimer>
#include <QGraphicsView>
@@ -138,6 +139,13 @@
d->preview->setInfo();
}
+void ToolTip::mouseReleaseEvent(QMouseEvent* event)
+{
+ if (rect().contains(event->pos())) {
+ hide();
+ }
+}
+
ToolTip::ToolTip()
: QWidget(0)
, d( new Private )
--- trunk/KDE/kdebase/workspace/libs/plasma/widgets/tooltip_p.h #760179:760180
@@ -50,7 +50,8 @@
Plasma::Widget *currentWidget() const;
protected:
- virtual void showEvent(QShowEvent *);
+ void showEvent(QShowEvent *);
+ void mouseReleaseEvent(QMouseEvent *);
void resizeEvent(QResizeEvent *);
void paintEvent(QPaintEvent *);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic