summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/selected-style.cpp
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2014-02-28 13:56:31 +0000
committerJazzyNico <nicoduf@yahoo.fr>2014-02-28 13:56:31 +0000
commitdd29914fcfe97975ce7145adc24cc556d67b83d2 (patch)
tree719c003e16d7042222aaaf9197bed731b72bf940 /src/ui/widget/selected-style.cpp
parentUse viewport when calculating filter region when filterUnits set to "userSpac... (diff)
downloadinkscape-dd29914fcfe97975ce7145adc24cc556d67b83d2.tar.gz
inkscape-dd29914fcfe97975ce7145adc24cc556d67b83d2.zip
Fix for Bug #1281859 (color gesture problems, alpha values below 0 and above 1).
Fixed bugs: - https://launchpad.net/bugs/1281859 (bzr r13074)
Diffstat (limited to 'src/ui/widget/selected-style.cpp')
-rw-r--r--src/ui/widget/selected-style.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index d29554c41..042a6614e 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -1267,6 +1267,11 @@ RotateableSwatch::color_adjust(float *hsla, double by, guint32 cc, guint modifie
} else if (modifier == 3) { // alpha
double old = hsla[3];
hsla[3] += by/2;
+ if (hsla[3] < 0) {
+ hsla[3] = 0;
+ } else if (hsla[3] > 1) {
+ hsla[3] = 1;
+ }
diff = hsla[3] - old;
} else { // hue
double old = hsla[0];