X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fcolorpicker.C;h=fd796bfcaef64b158ad34396ecb75e58a8f7a7e3;hb=8b9bf13ecb7f40eddc9155ac87bedce58c5942ed;hp=d14b4c1f90da8044bc96efdedecd9b9f67f434fe;hpb=28225c37859a74d59211f584abd785860eef9c13;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/colorpicker.C b/cinelerra-5.1/cinelerra/colorpicker.C index d14b4c1f..fd796bfc 100644 --- a/cinelerra-5.1/cinelerra/colorpicker.C +++ b/cinelerra-5.1/cinelerra/colorpicker.C @@ -156,7 +156,6 @@ ColorGUI::ColorGUI(BC_WindowBase *window) hue = 0; sat = 0; val = 0; red = 0; grn = 0; blu = 0; lum = 0; c_r = 0; c_b = 0; - alpha = 0; hsv_h = 0; hsv_s = 0; hsv_v = 0; rgb_r = 0; rgb_g = 0; rgb_b = 0; @@ -1364,7 +1363,7 @@ void ColorButtonPicker::update(int color, int alpha) int ColorButtonPicker::handle_new_color(int color, int alpha) { color_button->lock_window("ColorButtonPicker::handle_new_color"); - color_button->update_gui(color, alpha); + color_button->update_gui(color); color_button->unlock_window(); return color_button->handle_new_color(color, alpha); } @@ -1451,7 +1450,8 @@ void ColorBoxButton::create_objects() void ColorBoxButton::set_color(int color) { this->color = (color & 0xffffff); - this->alpha = (~color>>24) & 0xff; + if( this->alpha >= 0 ) + this->alpha = (~color>>24) & 0xff; int r = (color>>16) & 0xff; int g = (color>> 8) & 0xff; int b = (color>> 0) & 0xff; @@ -1513,7 +1513,8 @@ void ColorCircleButton::create_objects() void ColorCircleButton::set_color(int color) { this->color = (color & 0xffffff); - this->alpha = (~color>>24) & 0xff; + if( this->alpha >= 0 ) + this->alpha = (~color>>24) & 0xff; int r = (color>>16) & 0xff; int g = (color>>8) & 0xff; int b = (color>>0) & 0xff;