From 7eca9919713e02b5429372aa9f14aceec785b9de Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 5 Jan 2014 13:09:08 +0100 Subject: [PATCH] fix fader default-value line position --- libs/gtkmm2ext/pixfader.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/gtkmm2ext/pixfader.cc b/libs/gtkmm2ext/pixfader.cc index 22ed0dbb27..ef1dffc1dd 100644 --- a/libs/gtkmm2ext/pixfader.cc +++ b/libs/gtkmm2ext/pixfader.cc @@ -558,9 +558,9 @@ void PixFader::update_unity_position () { 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 { - 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 ();