X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fwidgets%2Fpopuptoolbutton.cpp;h=4ea6f3eda5c415da26f784830437f0ff364d6342;hp=ea3515c4981130696dc135b61748b510bbd90182;hb=4b53a1edfa2309a5b1f40f4adc78eff814fb0d15;hpb=6a91973f74ee7360a82e107e8b2d708030498291 diff --git a/pv/widgets/popuptoolbutton.cpp b/pv/widgets/popuptoolbutton.cpp index ea3515c4..4ea6f3ed 100644 --- a/pv/widgets/popuptoolbutton.cpp +++ b/pv/widgets/popuptoolbutton.cpp @@ -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(); }