From 4b53a1edfa2309a5b1f40f4adc78eff814fb0d15 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Sat, 23 Nov 2013 09:06:01 +0000 Subject: [PATCH] Slightly offset the PopupToolButton popup --- pv/widgets/popuptoolbutton.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); } -- 2.30.2