]> sigrok.org Git - pulseview.git/commitdiff
Slightly offset the PopupToolButton popup
authorJoel Holdsworth <redacted>
Sat, 23 Nov 2013 09:06:01 +0000 (09:06 +0000)
committerJoel Holdsworth <redacted>
Sat, 30 Nov 2013 18:14:05 +0000 (18:14 +0000)
pv/widgets/popuptoolbutton.cpp

index ea3515c4981130696dc135b61748b510bbd90182..4ea6f3eda5c415da26f784830437f0ff364d6342 100644 (file)
@@ -45,7 +45,9 @@ void PopupToolButton::on_clicked(bool)
        if(!_popup)
                return;
 
-       _popup->set_position(mapToGlobal(rect().center()), Popup::Bottom);
+       const QRect r = rect();
+       _popup->set_position(mapToGlobal(QPoint((r.left() + r.right()) / 2,
+               ((r.top() + r.bottom() * 3) / 4))), Popup::Bottom);
        _popup->show();
 }