projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Lots more changes which hopefully change nothing but the clarity.
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
gtkmm
/
widget_timeslider.cpp
diff --git
a/synfig-studio/trunk/src/gtkmm/widget_timeslider.cpp
b/synfig-studio/trunk/src/gtkmm/widget_timeslider.cpp
index
a0d0a84
..
d350d4a
100644
(file)
--- a/
synfig-studio/trunk/src/gtkmm/widget_timeslider.cpp
+++ b/
synfig-studio/trunk/src/gtkmm/widget_timeslider.cpp
@@
-87,11
+87,14
@@
Gdk::Color get_interp_color(synfig::Interpolation x)
static Gdk::Color
color_darken(Gdk::Color x, float amount)
{
static Gdk::Color
color_darken(Gdk::Color x, float amount)
{
- x.set_rgb_p(
- x.get_red_p()*amount,
- x.get_green_p()*amount,
- x.get_blue_p()*amount
- );
+ double red = x.get_red_p() * amount;
+ double green = x.get_green_p() * amount;
+ double blue = x.get_blue_p() * amount;
+
+ x.set_rgb_p( red > 1 ? 1 : red,
+ green > 1 ? 1 : green,
+ blue > 1 ? 1 : blue);
+
return x;
}
return x;
}