From b91eda58d66676742f25df2d277c04d8341033b3 Mon Sep 17 00:00:00 2001 From: dooglus Date: Tue, 25 Sep 2007 12:29:02 +0000 Subject: [PATCH] The color gradients displayed on the sliders in the color editor were being calculated incorrectly when "File > Setup > Misc > Visually Linear Color Selection" was enabled, resulting in different colors being displayed at each of the R, G and B sliders' current positions. git-svn-id: http://svn.voria.com/code@753 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/widget_coloredit.cpp | 34 +++++----------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/widget_coloredit.cpp b/synfig-studio/trunk/src/gtkmm/widget_coloredit.cpp index 37d4523..fc87e3c 100644 --- a/synfig-studio/trunk/src/gtkmm/widget_coloredit.cpp +++ b/synfig-studio/trunk/src/gtkmm/widget_coloredit.cpp @@ -157,38 +157,18 @@ ColorSlider::redraw(GdkEventExpose */*bleh*/) int i; for(i=width-1;i>=0;i--) { - color_func(color,float(i)/float(width)); + color_func(color,gamma_out(float(i)/float(width))); const Color c1(Color::blend(color,bg1,1.0).clamped()); const Color c2(Color::blend(color,bg2,1.0).clamped()); assert(c1.is_valid()); assert(c2.is_valid()); - gushort r1; - gushort g1; - gushort b1; - gushort r2; - gushort g2; - gushort b2; - - if(use_colorspace_gamma() && (type