diff options
author | Robin Gareus <robin@gareus.org> | 2014-10-29 16:07:13 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-10-29 16:07:13 +0100 |
commit | 1d0612ceb6e9a373500307a4d51d96c1c37e185b (patch) | |
tree | 9119bf0db59893cf96d4b885456439ec46160f8d /gtk2_ardour | |
parent | fdedf7153ece6bb04ac67d077eaeb28685baaaff (diff) |
redraw summary when theme preference changes & consolidate code.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_summary.cc | 21 | ||||
-rw-r--r-- | gtk2_ardour/editor_summary.h | 1 |
2 files changed, 16 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc index 85aed8291f..cc9f1a6783 100644 --- a/gtk2_ardour/editor_summary.cc +++ b/gtk2_ardour/editor_summary.cc @@ -21,6 +21,7 @@ #include "canvas/debug.h" +#include "ardour_ui.h" #include "time_axis_view.h" #include "streamview.h" #include "editor_summary.h" @@ -60,6 +61,8 @@ EditorSummary::EditorSummary (Editor* e) { add_events (Gdk::POINTER_MOTION_MASK|Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK); set_flags (get_flags() | Gtk::CAN_FOCUS); + + ARDOUR_UI::config()->ParameterChanged.connect (sigc::mem_fun (*this, &EditorSummary::parameter_changed)); } EditorSummary::~EditorSummary () @@ -67,6 +70,15 @@ EditorSummary::~EditorSummary () cairo_surface_destroy (_image); } +void +EditorSummary::parameter_changed (string p) +{ + + if (p == "color-regions-using-track-color") { + set_background_dirty (); + } +} + /** Handle a size allocation. * @param alloc GTK allocation. */ @@ -74,8 +86,7 @@ void EditorSummary::on_size_allocate (Gtk::Allocation& alloc) { CairoWidget::on_size_allocate (alloc); - _background_dirty = true; - set_dirty (); + set_background_dirty (); } @@ -1035,16 +1046,14 @@ EditorSummary::routes_added (list<RouteTimeAxisView*> const & r) } } - _background_dirty = true; - set_dirty (); + set_background_dirty (); } void EditorSummary::route_gui_changed (string c) { if (c == "color") { - _background_dirty = true; - set_dirty (); + set_background_dirty (); } } diff --git a/gtk2_ardour/editor_summary.h b/gtk2_ardour/editor_summary.h index f2e4eb08c4..588f7c0ed2 100644 --- a/gtk2_ardour/editor_summary.h +++ b/gtk2_ardour/editor_summary.h @@ -44,6 +44,7 @@ public: void routes_added (std::list<RouteTimeAxisView*> const &); private: + void parameter_changed (std::string); void on_size_allocate (Gtk::Allocation& alloc); enum Position { |