version update, rpm spec libva/vdpau fix, colorpicker tweaks, revert opencv v4->v3
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / colorpicker.C
index f36374669e8185d503ed1065693739e67586e2f0..7238d59d043a2adab7472bba5b5ef91e4565626f 100644 (file)
@@ -1342,7 +1342,8 @@ void ColorBoxButton::create_objects()
 
 void ColorBoxButton::set_color(int color)
 {
 
 void ColorBoxButton::set_color(int color)
 {
-       this->color = color;
+       this->color = (color & 0xffffff);
+       this->alpha = (~color>>24) & 0xff;
        int r = (color>>16) & 0xff;
        int g = (color>> 8) & 0xff;
        int b = (color>> 0) & 0xff;
        int r = (color>>16) & 0xff;
        int g = (color>> 8) & 0xff;
        int b = (color>> 0) & 0xff;
@@ -1403,7 +1404,8 @@ void ColorCircleButton::create_objects()
 
 void ColorCircleButton::set_color(int color)
 {
 
 void ColorCircleButton::set_color(int color)
 {
-       this->color = color;
+       this->color = (color & 0xffffff);
+       this->alpha = (~color>>24);
        int r = (color>>16) & 0xff;
        int g = (color>>8) & 0xff;
        int b = (color>>0) & 0xff;
        int r = (color>>16) & 0xff;
        int g = (color>>8) & 0xff;
        int b = (color>>0) & 0xff;