[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdevplatform/util
From: David Nolden <david.nolden.kde () art-master ! de>
Date: 2009-06-14 15:10:36
Message-ID: 1244992236.691495.32349.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 981962 by zwabel:
Do not hide the tooltip if it changed position after it had to be resized and moved away from the mouse.
M +16 -0 activetooltip.cpp
M +4 -0 activetooltip.h
--- trunk/KDE/kdevplatform/util/activetooltip.cpp #981961:981962
@@ -135,10 +135,25 @@
adjustRect();
}
+void ActiveToolTip::updateMouseDistance()
+{
+ d->previousDistance_ = (d->rect_.center() - QCursor::pos()).manhattanLength();
+}
+
+void ActiveToolTip::moveEvent(QMoveEvent* ev)
+{
+ QWidget::moveEvent(ev);
+
+ updateMouseDistance();
+}
+
void ActiveToolTip::resizeEvent(QResizeEvent*)
{
adjustRect();
+
emit resized();
+
+ updateMouseDistance();
}
void ActiveToolTip::addExtendRect(QRect rect)
@@ -152,6 +167,7 @@
QRect r = geometry();
r.adjust(-10, -10, 10, 10);
d->rect_ = r;
+ updateMouseDistance();
}
void ActiveToolTip::setBoundingGeometry(QRect r) {
--- trunk/KDE/kdevplatform/util/activetooltip.h #981961:981962
@@ -67,6 +67,8 @@
void showEvent(QShowEvent*);
void resizeEvent(QResizeEvent*);
+
+ void moveEvent(QMoveEvent*);
void adjustRect();
@@ -79,6 +81,8 @@
void resized();
private:
virtual void closeEvent(QCloseEvent* );
+ void updateMouseDistance();
+
class ActiveToolTipPrivate* const d;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic