13
0

fix fader default-value line position

This commit is contained in:
Robin Gareus 2014-01-05 13:09:08 +01:00
parent d89573f8e7
commit 7eca991971

View File

@ -558,9 +558,9 @@ void
PixFader::update_unity_position () PixFader::update_unity_position ()
{ {
if (_orien == VERT) { if (_orien == VERT) {
unity_loc = (int) rint (span * (1 - (default_value / (adjustment.get_upper() - adjustment.get_lower())))) - 1; unity_loc = (int) rint (span * (1 - ((default_value - adjustment.get_lower()) / (adjustment.get_upper() - adjustment.get_lower())))) - 1;
} else { } else {
unity_loc = (int) rint (default_value * span / (adjustment.get_upper() - adjustment.get_lower())); unity_loc = (int) rint ((default_value - adjustment.get_lower()) * span / (adjustment.get_upper() - adjustment.get_lower()));
} }
queue_draw (); queue_draw ();