diff options
author | deva <deva> | 2010-02-19 13:11:18 +0000 |
---|---|---|
committer | deva <deva> | 2010-02-19 13:11:18 +0000 |
commit | 3a6fc641e1f3d72be5e0036987a106b8c9c0db00 (patch) | |
tree | d36c3ac7fe467a12363f4013f624313ea152ce0a /client | |
parent | 0317050fe6434918b397674d82a5cfbfaaec9297 (diff) |
Make macros expand/collapse only when the button or the title are clicked. Not the line.
Diffstat (limited to 'client')
-rw-r--r-- | client/macrodrawer.cc | 5 |
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); } |