diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2019-02-12 11:30:31 -0600 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2019-02-12 11:36:04 -0600 |
commit | c881b4a85f77588b98ce0dc01bca86e8ff4ece89 (patch) | |
tree | c20c5fff8952e115c9bbc224deafbd7f0aba8204 /gtk2_ardour/editor_summary.cc | |
parent | 3e442ae52bdffd1da453ba6c3bd46bf034576a1b (diff) |
Summary View should use the playhead color from config.
Diffstat (limited to 'gtk2_ardour/editor_summary.cc')
-rw-r--r-- | gtk2_ardour/editor_summary.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc index e7355b577c..4ca37d191d 100644 --- a/gtk2_ardour/editor_summary.cc +++ b/gtk2_ardour/editor_summary.cc @@ -118,6 +118,10 @@ EditorSummary::set_session (Session* s) _editor->selection->RegionsChanged.connect (sigc::mem_fun(*this, &EditorSummary::set_background_dirty)); } + UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &EditorSummary::set_colors)); + + set_colors(); + _leftmost = max_samplepos; _rightmost = 0; } @@ -286,8 +290,9 @@ EditorSummary::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle /* Playhead */ cairo_set_line_width (cr, 1); - /* XXX: colour should be set from configuration file */ - cairo_set_source_rgba (cr, 1, 0, 0, 1); + + double r,g,b,a; Gtkmm2ext::color_to_rgba(_phead_color, r,g,b,a); + cairo_set_source_rgb (cr, r,g,b); // playhead color const double ph= playhead_sample_to_position (_editor->playhead_cursor->current_sample()); cairo_move_to (cr, ph, 0); @@ -299,6 +304,14 @@ EditorSummary::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle } +void +EditorSummary::set_colors () +{ + _phead_color = UIConfiguration::instance().color ("play head"); +} + + + /** Render a region for the summary. * @param r Region view. * @param cr Cairo context. |