X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fwidgets%2Fpopup.cpp;h=099c5499acafbb30ba119f8729879947ee45630b;hb=b6a2899ab732a873543efda2dff77a9d940fb614;hp=f89e38a6b1b84e3fdc9b923060f31688277c87f1;hpb=6e3f046e779b939efebdfa4d9e68fe28d9beee59;p=pulseview.git diff --git a/pv/widgets/popup.cpp b/pv/widgets/popup.cpp index f89e38a..099c549 100644 --- a/pv/widgets/popup.cpp +++ b/pv/widgets/popup.cpp @@ -20,6 +20,8 @@ #include +#include + #include #include "popup.h" @@ -29,9 +31,9 @@ using namespace std; namespace pv { namespace widgets { -const unsigned int Popup::ArrowLength = 15; +const unsigned int Popup::ArrowLength = 10; const unsigned int Popup::ArrowOverlap = 3; -const unsigned int Popup::MarginWidth = 10; +const unsigned int Popup::MarginWidth = 6; Popup::Popup(QWidget *parent) : QWidget(parent, Qt::Popup | Qt::FramelessWindowHint), @@ -198,11 +200,6 @@ void Popup::resizeEvent(QResizeEvent*) setMask(popup_region()); } -void Popup::showEvent(QShowEvent*) -{ - reposition_widget(); -} - void Popup::mouseReleaseEvent(QMouseEvent *e) { assert(e); @@ -213,6 +210,11 @@ void Popup::mouseReleaseEvent(QMouseEvent *e) close(); } +void Popup::showEvent(QShowEvent*) +{ + reposition_widget(); +} + } // namespace widgets } // namespace pv