sync markers

This commit is contained in:
Kizarm 2024-11-11 10:27:48 +01:00
parent 63813f9590
commit e0e6b36878

View file

@ -269,7 +269,7 @@ void DisplayWidget::drawBackground() {
p.drawLine (m_forward.map(hline));
p.drawLine (m_forward.map(vline));
// markers
QPen pm (QColor(255,255,0,196), 2);
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);
@ -311,8 +311,8 @@ void DisplayWidget::drawBackground() {
desc.sprintf("Marker A: %ss, Marker B: %ss, Δ=%ss, f=%sHz", ing_fmt(xz * m_time.a).c_str(), ing_fmt(xz * m_time.b).c_str(),
ing_fmt(delta).c_str(), ing_fmt(freq).c_str());
} else {
const double ofs = 0;// HALF_Y + (marker_type == MARKER_VOLT_A ? m_offset.a : m_offset.b);
double scl = 0.0; // TODO - ofset to text
const double ofs = - (marker_type == MARKER_VOLT_A ? m_offset.a : m_offset.b);
double scl = 0.0;
if (marker_type == MARKER_VOLT_A) { p.setPen (QPen (pcol.colA)); scl = m_channels.a; }
else { p.setPen (QPen (pcol.colB)); scl = m_channels.b; }
//qDebug("scl = %g, a=%g, b=%g, oa=%g, ob=%g", scl, m_volt.a, m_volt.b, m_offset.a, m_offset.b);