summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2010-04-29 12:28:25 +0000
committerdeva <deva>2010-04-29 12:28:25 +0000
commit76aaf6405c70f2238567cb292935b765f55c141c (patch)
tree037f7b9231d2c21d941d294cb2ec0a53d5bab6e5
parent0d76adfb6dce6dec1367913752f7b0a818e1bc21 (diff)
Backported 'no line expand' from head.
-rw-r--r--client/macrodrawer.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/macrodrawer.cc b/client/macrodrawer.cc
index 47edc22..89bd255 100644
--- a/client/macrodrawer.cc
+++ b/client/macrodrawer.cc
@@ -65,7 +65,10 @@ bool MacroDrawer::eventFilter(QObject *obj, QEvent *event)
{
if(event->type() == QEvent::MouseButtonRelease) {
QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
- if(mouseEvent->y() < 16 && isEnabled()) emit toggle();
+ if(mouseEvent->y() < 16 && isEnabled() &&
+ // Temporay hack. TODO: Calculate actual text width.
+ mouseEvent->x() < title().length() * 5)
+ emit toggle();
}
return QObject::eventFilter(obj, event);
}