+
+ 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;