summaryrefslogtreecommitdiff
path: root/gtk2_ardour/theme_manager.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-06-28 11:31:26 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-06-28 11:31:26 -0400
commit7a7e937d8e30ffa8552cade473223fb3ecd591b1 (patch)
treed890492266a30776705d81e2bce90d99e621c8f7 /gtk2_ardour/theme_manager.cc
parent144fdfbbd02f6c8538bb574c96b4d05e5ca8261f (diff)
more waveform drawing/coloring changes
* move color-regions-using-track color into UI config, not RC config * consolidate all waveform coloring into AudioRegionView::set_one_waveform_color()
Diffstat (limited to 'gtk2_ardour/theme_manager.cc')
-rw-r--r--gtk2_ardour/theme_manager.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk2_ardour/theme_manager.cc b/gtk2_ardour/theme_manager.cc
index 947d92bddf..ff37c315cf 100644
--- a/gtk2_ardour/theme_manager.cc
+++ b/gtk2_ardour/theme_manager.cc
@@ -59,6 +59,7 @@ ThemeManager::ThemeManager()
, light_button (_("Light Theme"))
, reset_button (_("Restore Defaults"))
, flat_buttons (_("Draw \"flat\" buttons"))
+ , region_color_button (_("Color regions using their track's color"))
, waveform_gradient_depth (0, 1.0, 0.05)
, waveform_gradient_depth_label (_("Waveforms color gradient depth"))
, timeline_item_gradient_depth (0, 1.0, 0.05)
@@ -102,6 +103,7 @@ ThemeManager::ThemeManager()
vbox->pack_start (all_dialogs, PACK_SHRINK);
#endif
vbox->pack_start (flat_buttons, PACK_SHRINK);
+ vbox->pack_start (region_color_button, PACK_SHRINK);
Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox());
hbox->set_spacing (6);
@@ -129,12 +131,16 @@ ThemeManager::ThemeManager()
color_dialog.get_colorsel()->set_has_opacity_control (true);
color_dialog.get_colorsel()->set_has_palette (true);
+ flat_buttons.set_active (ARDOUR_UI::config()->get_flat_buttons());
+ region_color_button.set_active (ARDOUR_UI::config()->get_color_regions_using_track_color());
+
color_dialog.get_ok_button()->signal_clicked().connect (sigc::bind (sigc::mem_fun (color_dialog, &Gtk::Dialog::response), RESPONSE_ACCEPT));
color_dialog.get_cancel_button()->signal_clicked().connect (sigc::bind (sigc::mem_fun (color_dialog, &Gtk::Dialog::response), RESPONSE_CANCEL));
dark_button.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_dark_theme_button_toggled));
light_button.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_light_theme_button_toggled));
reset_button.signal_clicked().connect (sigc::mem_fun (*this, &ThemeManager::reset_canvas_colors));
flat_buttons.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_flat_buttons_toggled));
+ region_color_button.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_region_color_toggled));
waveform_gradient_depth.signal_value_changed().connect (sigc::mem_fun (*this, &ThemeManager::on_waveform_gradient_depth_change));
timeline_item_gradient_depth.signal_value_changed().connect (sigc::mem_fun (*this, &ThemeManager::on_timeline_item_gradient_depth_change));
all_dialogs.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_all_dialogs_toggled));
@@ -280,6 +286,13 @@ ThemeManager::on_flat_buttons_toggled ()
}
void
+ThemeManager::on_region_color_toggled ()
+{
+ ARDOUR_UI::config()->set_color_regions_using_track_color (region_color_button.get_active());
+ ARDOUR_UI::config()->set_dirty ();
+}
+
+void
ThemeManager::on_all_dialogs_toggled ()
{
ARDOUR_UI::config()->set_all_floating_windows_are_dialogs (all_dialogs.get_active());