diff --git a/V203/usb/scope/software/displaywidget.cpp b/V203/usb/scope/software/displaywidget.cpp index f45d31e..9ce568a 100644 --- a/V203/usb/scope/software/displaywidget.cpp +++ b/V203/usb/scope/software/displaywidget.cpp @@ -264,18 +264,22 @@ void DisplayWidget::drawBackground() { QPointF trg (m_ts->offset, m_ts->value + ofs); QPen pc (QColor(0,128,255), 1); p.setPen(pc); - const QLineF hline (xb, trg.y(), xe, trg.y()); - const QLineF vline (trg.x(), -ye, trg.x(), ye); - p.drawLine (m_forward.map(hline)); - p.drawLine (m_forward.map(vline)); + const qreal pos = 30.0; + const QLineF hline = m_forward.map(QLine(xb, trg.y(), xe, trg.y())); + const QLineF vline = m_forward.map(QLine(trg.x(), -ye, trg.x(), ye)); + QPointF vb = vline.p1() + QPointF(0,-pos), ve = vline.p2() + QPointF(0,+pos); + p.drawLine (hline); + p.drawLine (QLineF(vb,ve)); // markers QPen pm (QColor(255,255,0,196), 1); p.setPen(pm); if (marker_type == MARKER_TIME) { - const QLineF ma (m_time.a, -ye, m_time.a, ye); - const QLineF mb (m_time.b, -ye, m_time.b, ye); - p.drawLine (m_forward.map(ma)); - p.drawLine (m_forward.map(mb)); + const QLineF ma = m_forward.map(QLine (m_time.a, -ye, m_time.a, ye)); + const QLineF mb = m_forward.map(QLine (m_time.b, -ye, m_time.b, ye)); + vb = ma.p1() + QPointF(0,-pos), ve = ma.p2() + QPointF(0,+pos); + p.drawLine (QLineF(vb, ve)); + vb = mb.p1() + QPointF(0,-pos), ve = mb.p2() + QPointF(0,+pos); + p.drawLine (QLineF(vb, ve)); } else { const QLineF ma (xb, m_volt.a, xe, m_volt.a); const QLineF mb (xb, m_volt.b, xe, m_volt.b);