X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fview.cpp;h=f349861f226fe0f1833974b0d9ca9216e6a1466c;hp=4575d05e2b7dd0fc58009a4bc927892dbe52a9a3;hb=f1d9ac673ce644a7e2397bd1c4687083157f4a17;hpb=5c5ce7574062e0d3ad4f7d9dde70b482315d54fb diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 4575d05e..f349861f 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -198,6 +198,7 @@ const Viewport* View::viewport() const vector< shared_ptr > View::time_items() const { vector< shared_ptr > items; + items.push_back(cursors_); items.push_back(cursors_->first()); items.push_back(cursors_->second()); return items; @@ -482,11 +483,11 @@ void View::update_scroll() // Set the vertical scrollbar verticalScrollBar()->setPageStep(areaSize.height()); + verticalScrollBar()->setSingleStep(areaSize.height() / 8); const pair extents = v_extents(); - const int extra_scroll_height = (extents.second - extents.first) / 4; - verticalScrollBar()->setRange(extents.first - extra_scroll_height, - extents.first + extra_scroll_height); + verticalScrollBar()->setRange(extents.first - (areaSize.height() / 2), + extents.second - (areaSize.height() / 2)); } void View::update_layout() @@ -505,16 +506,16 @@ void View::update_layout() update_scroll(); } -void View::paint_label(QPainter &p, int right, bool hover) +void View::paint_label(QPainter &p, const QRect &rect, bool hover) { (void)p; - (void)right; + (void)rect; (void)hover; } -QRectF View::label_rect(int right) +QRectF View::label_rect(const QRectF &rect) { - (void)right; + (void)rect; return QRectF(); }