Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / colorpicker.C
index 7c0a38d0d946fa8364b5e0c84c25ed442d2110e2..b1e2a94969a5cb745170c9b29b532e51ca6b7a44 100644 (file)
@@ -109,6 +109,8 @@ ColorWindow::ColorWindow(ColorPicker *thread, int x, int y, int w, int h, const
    ColorGUI(this)
 {
        this->thread = thread;
+// *** CONTEXT_HELP ***
+       context_help_set_keyword("Title");
 }
 
 ColorWindow::~ColorWindow()
@@ -156,7 +158,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;
@@ -252,6 +253,8 @@ void ColorGUI::create_objects()
 
        x += hue->get_w() + xs10;
        hsv_h = new PaletteHSV(this, x,y= y0, hsv.h, 0, 360);
+       hsv_h->set_increment(1);
+       hsv_h->set_precision(1);
        hsv_h->create_objects();  hsv_h->set_tooltip(_("Hue"));
        hsv_s = new PaletteHSV(this, x,y+=ys25, hsv.s, 0, 1);
        hsv_s->create_objects();  hsv_s->set_tooltip(_("Saturation"));
@@ -1362,7 +1365,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);
 }
@@ -1449,7 +1452,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;
@@ -1511,7 +1515,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;