+
+ const pair<int, int> 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);
+}
+
+void View::update_layout()
+{
+ setViewportMargins(
+ header_->sizeHint().width() - pv::view::Header::BaselineOffset,
+ ruler_->sizeHint().height(), 0, 0);
+ ruler_->setGeometry(viewport_->x(), 0,
+ viewport_->width(), viewport_->y());
+ cursorheader_->setGeometry(
+ viewport_->x(),
+ ruler_->sizeHint().height() - cursorheader_->sizeHint().height() / 2,
+ viewport_->width(), cursorheader_->sizeHint().height());
+ header_->setGeometry(0, viewport_->y(),
+ header_->sizeHint().width(), viewport_->height());
+ update_scroll();
+}
+
+void View::paint_label(QPainter &p, int right, bool hover)
+{
+ (void)p;
+ (void)right;
+ (void)hover;
+}
+
+QRectF View::label_rect(int right)
+{
+ (void)right;
+ return QRectF();