m_point_widget->setAlphatest(1);
m_position = 0;
m_length = 0;
+ m_have_foreground_color = 0;
}
ePositionGauge::~ePositionGauge()
}
}
- painter.setForegroundColor(gRGB(0x225b7395));
- int xi = scale(in), xo = scale(out);
- painter.fill(eRect(xi, 10, xo-xi, s.height()-14));
+ if (m_have_foreground_color)
+ {
+ painter.setForegroundColor(gRGB(m_foreground_color));
+ int xi = scale(in), xo = scale(out);
+ painter.fill(eRect(xi, 10, xo-xi, s.height()-14));
+ }
+
in = m_length;
if (i == m_cue_entries.end())
break;
}
// painter.setForegroundColor(gRGB(0x00000000));
- painter.setForegroundColor(gRGB(0x225b7395));
- painter.fill(eRect(s.width() - 2, 2, s.width() - 1, s.height() - 4));
- painter.fill(eRect(0, 2, 2, s.height() - 4));
+
+ if (m_have_foreground_color)
+ {
+ painter.setForegroundColor(gRGB(0x225b7395));
+ painter.fill(eRect(s.width() - 2, 2, s.width() - 1, s.height() - 4));
+ painter.fill(eRect(0, 2, 2, s.height() - 4));
+ }
#if 0
// border
return width * val / m_length;
}
+
+void ePositionGauge::setForegroundColor(const gRGB &col)
+{
+ if ((!m_have_foreground_color) || !(m_foreground_color == col))
+ {
+ m_foreground_color = col;
+ m_have_foreground_color = 1;
+ invalidate();
+ }
+}