summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/fastmeter.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-08-31 17:22:05 +0000
committerDavid Robillard <d@drobilla.net>2011-08-31 17:22:05 +0000
commitc55f142ad055a9b40064a4d1f5399b8361c779c6 (patch)
treece859d24a993a2b5109dad2c7d663b2e744ff132 /libs/gtkmm2ext/fastmeter.cc
parentd3c38e28fc71393ed8dd14abf3c1a8f63c978fc5 (diff)
Fix meter colour gradients (mid and top were swapped).
I removed the double stop around the knee because... well, this is the way I figured out that actually follows the colour configuration as expected. It may be less correct for some reason, but it looks like what I expect when twiddling the colours, anyway. git-svn-id: svn://localhost/ardour2/branches/3.0@10041 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext/fastmeter.cc')
-rw-r--r--libs/gtkmm2ext/fastmeter.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/libs/gtkmm2ext/fastmeter.cc b/libs/gtkmm2ext/fastmeter.cc
index b5a9502156..79d2871459 100644
--- a/libs/gtkmm2ext/fastmeter.cc
+++ b/libs/gtkmm2ext/fastmeter.cc
@@ -116,14 +116,11 @@ FastMeter::generate_meter_pattern (
/* cairo coordinate space goes downwards as y value goes up, so invert
* knee-based positions by using (1.0 - y)
- *
- * also, double-stop the knee point, so that we get a hard transition
*/
cairo_pattern_add_color_stop_rgb (_p, 0.0, r3/255.0, g3/255.0, b3/255.0); // bottom
- cairo_pattern_add_color_stop_rgb (_p, 1.0 - (knee/(2.0 * height)), r2/255.0, g2/255.0, b2/255.0); // mid-point to knee
- cairo_pattern_add_color_stop_rgb (_p, 1.0 - (knee/(double)height), r0/255.0, g0/255.0, b0/255.0); // knee
- cairo_pattern_add_color_stop_rgb (_p, 1.0 - (knee/(double)height), r1/255.0, g1/255.0, b1/255.0); // double-stop @ knee
+ cairo_pattern_add_color_stop_rgb (_p, 1.0 - (knee/(double)height), r2/255.0, g2/255.0, b2/255.0); // mid-point to knee
+ cairo_pattern_add_color_stop_rgb (_p, 1.0 - (knee/(2.0 * height)), r1/255.0, g1/255.0, b1/255.0); // knee to top
cairo_pattern_add_color_stop_rgb (_p, 1.0, r0/255.0, g0/255.0, b0/255.0); // top
Cairo::RefPtr<Cairo::Pattern> p (new Cairo::Pattern (_p, false));