Update gain widget to show no decimal places for scale > 0.5
The 4th Gen input gain control scale is 69/70 which is close enough to 1 that we don't need to display any decimal places.
This commit is contained in:
@@ -70,12 +70,12 @@ static void gain_updated(
|
||||
p += sprintf(p, "−");
|
||||
else if (value > 0)
|
||||
p += sprintf(p, "+");
|
||||
if (data->scale < 1)
|
||||
if (data->scale <= 0.5)
|
||||
p += sprintf(p, "%.1f", fabs(value));
|
||||
else
|
||||
p += sprintf(p, "%.0f", fabs(value));
|
||||
}
|
||||
if (data->scale >= 1)
|
||||
if (data->scale > 0.5)
|
||||
p += sprintf(p, "dB");
|
||||
|
||||
gtk_label_set_text(GTK_LABEL(data->label), s);
|
||||
|
||||
Reference in New Issue
Block a user