diff options
author | Robin Gareus <robin@gareus.org> | 2017-03-10 23:51:39 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-03-11 00:33:43 +0100 |
commit | 05dfc1fdc1e0c0e41dadfacbfb5c1076f8a7364a (patch) | |
tree | 7a2264db527fb700a4cf0a80fc24931f73917023 /gtk2_ardour/vca_master_strip.cc | |
parent | 7a709f23f13c7485200cbd67dd3adb4e1a268359 (diff) |
Update color stripable color-picker(s)
* consistent behavior (Route, VCA)
* non-modal
* a single color picker for each RouteUI/VCA at most
* fix bug: VCA picker staying around even when VCA was deleted
Diffstat (limited to 'gtk2_ardour/vca_master_strip.cc')
-rw-r--r-- | gtk2_ardour/vca_master_strip.cc | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/gtk2_ardour/vca_master_strip.cc b/gtk2_ardour/vca_master_strip.cc index 5e96010c3c..2d6088fbdf 100644 --- a/gtk2_ardour/vca_master_strip.cc +++ b/gtk2_ardour/vca_master_strip.cc @@ -17,7 +17,6 @@ */ #include <gtkmm/stock.h> -#include <gtkmm/colorselection.h> #include "pbd/convert.h" @@ -526,30 +525,7 @@ VCAMasterStrip::state_id () const void VCAMasterStrip::start_color_edit () { - Gtk::ColorSelectionDialog* color_dialog = new Gtk::ColorSelectionDialog; - - color_dialog->get_colorsel()->set_has_opacity_control (false); - color_dialog->get_colorsel()->set_has_palette (true); - - Gdk::Color c = gdk_color_from_rgba (_vca->presentation_info().color ()); - - color_dialog->get_colorsel()->set_previous_color (c); - color_dialog->get_colorsel()->set_current_color (c); - - color_dialog->signal_response().connect (sigc::bind (sigc::mem_fun (*this, &VCAMasterStrip::finish_color_edit), color_dialog)); - color_dialog->present (); -} - -void -VCAMasterStrip::finish_color_edit (int response, Gtk::ColorSelectionDialog* dialog) -{ - switch (response) { - case RESPONSE_OK: - _vca->presentation_info().set_color (gdk_color_to_rgba (dialog->get_colorsel()->get_current_color())); - break; - } - - delete_when_idle (dialog); + _color_picker.popup (_vca); } bool |