From 76aaf6405c70f2238567cb292935b765f55c141c Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 29 Apr 2010 12:28:25 +0000 Subject: Backported 'no line expand' from head. --- client/macrodrawer.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(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); } -- cgit v1.2.3