aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/ThemeNew.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp
index 9fc9c06eda..5d533035aa 100644
--- a/gui/ThemeNew.cpp
+++ b/gui/ThemeNew.cpp
@@ -1638,6 +1638,7 @@ inline OverlayColor getColorAlphaImpl(OverlayColor col1, OverlayColor col2, int
output |= ((alpha * ((col1 & T::kRedMask) - (col2 & T::kRedMask)) >> 8) + (col2 & T::kRedMask)) & T::kRedMask;
output |= ((alpha * ((col1 & T::kGreenMask) - (col2 & T::kGreenMask)) >> 8) + (col2 & T::kGreenMask)) & T::kGreenMask;
output |= ((alpha * ((col1 & T::kBlueMask) - (col2 & T::kBlueMask)) >> 8) + (col2 & T::kBlueMask)) & T::kBlueMask;
+ output |= ~(T::kRedMask | T::kGreenMask | T::kBlueMask);
return output;
}
@@ -1648,6 +1649,7 @@ inline OverlayColor getColorAlphaImp2(OverlayColor col1, OverlayColor col2, int
output |= ((alpha * ((~col1 & T::kRedMask) - (col2 & T::kRedMask)) >> 8) + (col2 & T::kRedMask)) & T::kRedMask;
output |= ((alpha * ((~col1 & T::kGreenMask) - (col2 & T::kGreenMask)) >> 8) + (col2 & T::kGreenMask)) & T::kGreenMask;
output |= ((alpha * ((~col1 & T::kBlueMask) - (col2 & T::kBlueMask)) >> 8) + (col2 & T::kBlueMask)) & T::kBlueMask;
+ output |= ~(T::kRedMask | T::kGreenMask | T::kBlueMask);
return output;
}
@@ -1673,6 +1675,7 @@ inline OverlayColor calcGradient(OverlayColor start, OverlayColor end, int pos)
output |= (start + ((((end & T::kRedMask) - (start & T::kRedMask))) * pos >> 12)) & T::kRedMask;
output |= (start + ((((end & T::kGreenMask) - (start & T::kGreenMask))) * pos >> 12)) & T::kGreenMask;
output |= (start + ((((end & T::kBlueMask) - (start & T::kBlueMask))) * pos >> 12)) & T::kBlueMask;
+ output |= ~(T::kRedMask | T::kGreenMask | T::kBlueMask);
return output;
}