13
0

respond to changes in use-note-color-for-velocity

This commit is contained in:
Paul Davis 2018-07-03 17:02:20 -04:00
parent 38b499a8f0
commit b1ad462a7a
2 changed files with 9 additions and 1 deletions

View File

@ -6169,6 +6169,8 @@ Editor::ui_parameter_changed (string parameter)
} else if (parameter == "use-note-bars-for-velocity") { } else if (parameter == "use-note-bars-for-velocity") {
ArdourCanvas::Note::set_show_velocity_bars (UIConfiguration::instance().get_use_note_bars_for_velocity()); ArdourCanvas::Note::set_show_velocity_bars (UIConfiguration::instance().get_use_note_bars_for_velocity());
_track_canvas->request_redraw (_track_canvas->visible_area()); _track_canvas->request_redraw (_track_canvas->visible_area());
} else if (parameter == "use-note-color-for-velocity") {
UIConfiguration::instance().ColorsChanged(); /* EMIT SIGNAL */
} }
} }

View File

@ -201,7 +201,13 @@ NoteBase::base_color()
_selected_col, 0.5); _selected_col, 0.5);
default: default:
return meter_style_fill_color(_note->velocity(), selected()); if (UIConfiguration::instance().get_use_note_color_for_velocity()) {
return meter_style_fill_color(_note->velocity(), selected());
} else {
const uint32_t region_color = _region.midi_stream_view()->get_region_color();
return UINT_INTERPOLATE (UINT_RGBA_CHANGE_A (region_color, opacity), _selected_col,
0.5);
}
}; };
return 0; return 0;