X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fheader.cpp;h=82c7dd0559a4662fe4123c2c4ed213c7649c8fe7;hb=819e2e95555b2b3c2190f24a3cfa82250d1f34e5;hp=837d1916c72a69f10e8e460cbc2296c2cc88408d;hpb=f4433aa958fb9c85ce82ef5545d722625cb64f9e;p=pulseview.git diff --git a/pv/view/header.cpp b/pv/view/header.cpp index 837d191..82c7dd0 100644 --- a/pv/view/header.cpp +++ b/pv/view/header.cpp @@ -62,9 +62,6 @@ static bool item_selected(shared_ptr r) Header::Header(View &parent) : MarginWidget(parent) { - setFocusPolicy(Qt::ClickFocus); - setMouseTracking(true); - connect(&view_, SIGNAL(signals_moved()), this, SLOT(on_signals_moved())); } @@ -78,9 +75,14 @@ QSize Header::sizeHint() const return QSize(max_rect.width() + Padding + BaselineOffset, 0); } +QSize Header::extended_size_hint() const +{ + return sizeHint() + QSize(ViewItem::HighlightRadius, 0); +} + shared_ptr Header::get_mouse_over_row_item(const QPoint &pt) { - const QRect r(BaselineOffset, 0, width() - BaselineOffset, height()); + const QRect r(0, 0, width() - BaselineOffset, height()); for (auto &i : view_) if (i->enabled() && i->label_rect(r).contains(pt)) return i; @@ -112,7 +114,7 @@ void Header::paintEvent(QPaintEvent*) // The trace labels are not drawn with the arrows exactly on the // left edge of the widget, because then the selection shadow // would be clipped away. - const QRect rect(BaselineOffset, 0, width() - BaselineOffset, height()); + const QRect rect(0, 0, width() - BaselineOffset, height()); vector< shared_ptr > row_items( view_.begin(), view_.end());