mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
midi ghost region fill colour is per event. don't store it. ensure _outline is set.
This commit is contained in:
parent
9f1deb9ea4
commit
c876aea64d
2 changed files with 7 additions and 5 deletions
|
|
@ -181,6 +181,8 @@ MidiGhostRegion::MidiGhostRegion(RegionView& rv,
|
||||||
: GhostRegion(rv, tv.ghost_group(), tv, source_tv, initial_unit_pos)
|
: GhostRegion(rv, tv.ghost_group(), tv, source_tv, initial_unit_pos)
|
||||||
, _optimization_iterator(events.end())
|
, _optimization_iterator(events.end())
|
||||||
{
|
{
|
||||||
|
set_colors();
|
||||||
|
|
||||||
base_rect->lower_to_bottom();
|
base_rect->lower_to_bottom();
|
||||||
update_range ();
|
update_range ();
|
||||||
|
|
||||||
|
|
@ -203,6 +205,8 @@ MidiGhostRegion::MidiGhostRegion(RegionView& rv,
|
||||||
initial_unit_pos)
|
initial_unit_pos)
|
||||||
, _optimization_iterator(events.end())
|
, _optimization_iterator(events.end())
|
||||||
{
|
{
|
||||||
|
set_colors();
|
||||||
|
|
||||||
base_rect->lower_to_bottom();
|
base_rect->lower_to_bottom();
|
||||||
update_range ();
|
update_range ();
|
||||||
|
|
||||||
|
|
@ -265,11 +269,10 @@ void
|
||||||
MidiGhostRegion::set_colors()
|
MidiGhostRegion::set_colors()
|
||||||
{
|
{
|
||||||
GhostRegion::set_colors();
|
GhostRegion::set_colors();
|
||||||
|
_outline = UIConfiguration::instance().color ("ghost track midi outline");
|
||||||
|
|
||||||
for (EventList::iterator it = events.begin(); it != events.end(); ++it) {
|
for (EventList::iterator it = events.begin(); it != events.end(); ++it) {
|
||||||
_fill = UIConfiguration::instance().color_mod((*it)->event->base_color(), "ghost track midi fill");
|
(*it)->item->set_fill_color (UIConfiguration::instance().color_mod((*it)->event->base_color(), "ghost track midi fill"));
|
||||||
_outline = UIConfiguration::instance().color ("ghost track midi outline");
|
|
||||||
(*it)->item->set_fill_color (_fill);
|
|
||||||
(*it)->item->set_outline_color (_outline);
|
(*it)->item->set_outline_color (_outline);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -333,7 +336,7 @@ MidiGhostRegion::add_note (NoteBase* n)
|
||||||
GhostEvent* event = new GhostEvent (n, group);
|
GhostEvent* event = new GhostEvent (n, group);
|
||||||
events.push_back (event);
|
events.push_back (event);
|
||||||
|
|
||||||
event->item->set_fill_color (_fill);
|
event->item->set_fill_color (UIConfiguration::instance().color_mod(n->base_color(), "ghost track midi fill"));
|
||||||
event->item->set_outline_color (_outline);
|
event->item->set_outline_color (_outline);
|
||||||
|
|
||||||
MidiStreamView* mv = midi_view();
|
MidiStreamView* mv = midi_view();
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,6 @@ public:
|
||||||
void clear_events();
|
void clear_events();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ArdourCanvas::Color _fill;
|
|
||||||
ArdourCanvas::Color _outline;
|
ArdourCanvas::Color _outline;
|
||||||
|
|
||||||
MidiGhostRegion::GhostEvent* find_event (NoteBase*);
|
MidiGhostRegion::GhostEvent* find_event (NoteBase*);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue