Skip to content

Commit 8f0d877

Browse files
More prominent fader ticks around 0 dB
Make the fader ticks around 0 dB more prominent but drawing them slightly wider and with a more opaque color.
1 parent fa9148e commit 8f0d877

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/gui/widgets/Fader.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,13 +697,23 @@ void Fader::paintFaderTicks(QPainter& painter)
697697
{
698698
painter.save();
699699

700-
painter.setPen(QColor(255, 255, 255, 128));
700+
const QPen zeroPen(QColor(255, 255, 255, 216), 1.5);
701+
const QPen nonZeroPen(QColor(255, 255, 255, 128), 1.);
701702

702703
for (float i = 6.f; i >= -120.f; i-= 6.f)
703704
{
704705
const auto scaledRatio = computeScaledRatio(i);
705706
const auto maxHeight = height() - (height() - m_knob.height()) * scaledRatio - (m_knob.height() / 2);
706707

708+
if (approximatelyEqual(i, 0.))
709+
{
710+
painter.setPen(zeroPen);
711+
}
712+
else
713+
{
714+
painter.setPen(nonZeroPen);
715+
}
716+
707717
painter.drawLine(QPointF(0, maxHeight), QPointF(1, maxHeight));
708718
painter.drawLine(QPointF(width() - 1, maxHeight), QPointF(width(), maxHeight));
709719
}

0 commit comments

Comments
 (0)