From 41a31daad4670a48d0fe8798b5611a12da480db6 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Sat, 30 Jan 2010 23:52:15 -0600 Subject: [PATCH] Mixer: Add color chooser to mixer strip context menu. --- Mixer/Mixer_Strip.C | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Mixer/Mixer_Strip.C b/Mixer/Mixer_Strip.C index a6b408e..400b0b5 100644 --- a/Mixer/Mixer_Strip.C +++ b/Mixer/Mixer_Strip.C @@ -42,6 +42,8 @@ #include "FL/Fl_Flowpack.H" #include #include +#include +#include #include "Mixer.H" #include "Chain.H" @@ -487,6 +489,17 @@ Mixer_Strip::menu_cb ( const Fl_Menu_ *m ) command_move_right(); else if ( ! strcmp( picked, "/Rename" ) ) name_field->take_focus(); + else if ( ! strcmp( picked, "/Color" ) ) + { + unsigned char r, g, b; + + Fl::get_color( color(), r, g, b ); + + if ( fl_color_chooser( "Strip Color", r, g, b ) ) + color( fl_rgb_color( r, g, b ) ); + + redraw(); + } else if ( ! strcmp( picked, "/Remove" ) ) { if ( Fl::event_shift() || 1 == fl_choice( "Are you sure you want to remove this strip?\n\n(this action cannot be undone)", "Cancel", "Remove", NULL ) )