X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fwidgets%2Fpopup.cpp;h=de2d1b57010643228bb28c5ba713eb25723c55eb;hb=f32905530347e1020d5ce7959123cf797c9a4829;hp=7143c24a9aba9ce568bc933d3283ee67c648660c;hpb=2acdb232d6bb452cfdfaea3ef5218fb4da592329;p=pulseview.git diff --git a/pv/widgets/popup.cpp b/pv/widgets/popup.cpp index 7143c24..de2d1b5 100644 --- a/pv/widgets/popup.cpp +++ b/pv/widgets/popup.cpp @@ -146,7 +146,7 @@ QPolygon Popup::arrow_polygon() const const int l = ArrowLength + ArrowOverlap; switch (pos_) - { + { case Right: poly << QPoint(p.x() + l, p.y() - l); break; @@ -155,7 +155,7 @@ QPolygon Popup::arrow_polygon() const poly << QPoint(p.x() - l, p.y() + l); break; - case Left: + case Left: case Top: poly << QPoint(p.x() - l, p.y() - l); break; @@ -164,13 +164,13 @@ QPolygon Popup::arrow_polygon() const poly << p; switch (pos_) - { + { case Right: case Bottom: poly << QPoint(p.x() + l, p.y() + l); break; - case Left: + case Left: poly << QPoint(p.x() - l, p.y() + l); break; @@ -238,7 +238,7 @@ void Popup::reposition_widget() if (pos_ == Left) o.rx() = -width(); - else if(pos_ == Top) + else if (pos_ == Top) o.ry() = -height(); o += point_; @@ -300,7 +300,7 @@ void Popup::mouseReleaseEvent(QMouseEvent *e) // We need our own out-of-bounds click handler because QWidget counts // the drop-shadow region as inside the widget - if(!bubble_rect().contains(e->pos())) + if (!bubble_rect().contains(e->pos())) close(); } @@ -311,4 +311,3 @@ void Popup::showEvent(QShowEvent*) } // namespace widgets } // namespace pv -