+QRectF Trace::hit_box_rect(const ViewItemPaintParams &pp) const
+{
+ const float h = QFontMetrics(QApplication::font()).height();
+ return QRectF(pp.left(), get_visual_y() - h / 2.0f,
+ pp.width(), h);
+}
+
+void Trace::paint_back(QPainter &p, const ViewItemPaintParams &pp)
+{
+ if (coloured_bg_)
+ p.setBrush(bgcolour_);
+ else
+ p.setBrush(bgcolour_state_ ? BrightBGColour : DarkBGColour);
+
+ p.setPen(QPen(Qt::NoPen));
+
+ const std::pair<int, int> extents = v_extents();
+
+ const int x = 0;
+ const int y = get_visual_y() + extents.first;
+ const int w = pp.right() - pp.left();
+ const int h = extents.second - extents.first;
+
+ p.drawRect(x, y, w, h);
+}
+