Highligh ranges in arrangement ruler
This commit is contained in:
parent
6b8c7292a5
commit
a14f216f3e
@ -611,6 +611,8 @@ Editor::Editor ()
|
|||||||
selection->TimeChanged.connect (sigc::mem_fun(*this, &Editor::time_selection_changed));
|
selection->TimeChanged.connect (sigc::mem_fun(*this, &Editor::time_selection_changed));
|
||||||
selection->TracksChanged.connect (sigc::mem_fun(*this, &Editor::track_selection_changed));
|
selection->TracksChanged.connect (sigc::mem_fun(*this, &Editor::track_selection_changed));
|
||||||
|
|
||||||
|
ZoomChanged.connect (sigc::mem_fun (*this, &Editor::update_section_rects));
|
||||||
|
|
||||||
editor_regions_selection_changed_connection = selection->RegionsChanged.connect (sigc::mem_fun(*this, &Editor::region_selection_changed));
|
editor_regions_selection_changed_connection = selection->RegionsChanged.connect (sigc::mem_fun(*this, &Editor::region_selection_changed));
|
||||||
|
|
||||||
selection->PointsChanged.connect (sigc::mem_fun(*this, &Editor::point_selection_changed));
|
selection->PointsChanged.connect (sigc::mem_fun(*this, &Editor::point_selection_changed));
|
||||||
@ -1433,6 +1435,10 @@ Editor::set_session (Session *t)
|
|||||||
_session->auto_loop_location_changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::loop_location_changed, this, _1), gui_context ());
|
_session->auto_loop_location_changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::loop_location_changed, this, _1), gui_context ());
|
||||||
_session->history().Changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::history_changed, this), gui_context());
|
_session->history().Changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::history_changed, this), gui_context());
|
||||||
|
|
||||||
|
Location::start_changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::update_section_rects, this), gui_context ());
|
||||||
|
Location::end_changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::update_section_rects, this), gui_context ());
|
||||||
|
Location::flags_changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::update_section_rects, this), gui_context ());
|
||||||
|
|
||||||
_playhead_cursor->track_canvas_item().reparent ((ArdourCanvas::Item*) get_cursor_scroll_group());
|
_playhead_cursor->track_canvas_item().reparent ((ArdourCanvas::Item*) get_cursor_scroll_group());
|
||||||
_playhead_cursor->show ();
|
_playhead_cursor->show ();
|
||||||
|
|
||||||
|
@ -718,6 +718,7 @@ private:
|
|||||||
void location_changed (ARDOUR::Location*);
|
void location_changed (ARDOUR::Location*);
|
||||||
void location_flags_changed (ARDOUR::Location*);
|
void location_flags_changed (ARDOUR::Location*);
|
||||||
void refresh_location_display ();
|
void refresh_location_display ();
|
||||||
|
void update_section_rects ();
|
||||||
void refresh_location_display_internal (const ARDOUR::Locations::LocationList&);
|
void refresh_location_display_internal (const ARDOUR::Locations::LocationList&);
|
||||||
void add_new_location (ARDOUR::Location*);
|
void add_new_location (ARDOUR::Location*);
|
||||||
ArdourCanvas::Container* add_new_location_internal (ARDOUR::Location*);
|
ArdourCanvas::Container* add_new_location_internal (ARDOUR::Location*);
|
||||||
|
@ -171,7 +171,7 @@ Editor::initialize_canvas ()
|
|||||||
tempo_meta_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, (timebar_height * 4.0) + 1.0));
|
tempo_meta_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, (timebar_height * 4.0) + 1.0));
|
||||||
CANVAS_DEBUG_NAME (tempo_meta_group, "tempo meta group");
|
CANVAS_DEBUG_NAME (tempo_meta_group, "tempo meta group");
|
||||||
section_marker_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, (timebar_height * 5.0) + 1.0));
|
section_marker_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, (timebar_height * 5.0) + 1.0));
|
||||||
CANVAS_DEBUG_NAME (tempo_meta_group, "Arranger marker group");
|
CANVAS_DEBUG_NAME (section_marker_group, "Arranger marker group");
|
||||||
tempo_group = new ArdourCanvas::Container (tempo_meta_group, ArdourCanvas::Duple (0.0, 0.0));
|
tempo_group = new ArdourCanvas::Container (tempo_meta_group, ArdourCanvas::Duple (0.0, 0.0));
|
||||||
CANVAS_DEBUG_NAME (tempo_group, "tempo group");
|
CANVAS_DEBUG_NAME (tempo_group, "tempo group");
|
||||||
mapping_group = new ArdourCanvas::Container (tempo_meta_group, ArdourCanvas::Duple (0.0, 0.0));
|
mapping_group = new ArdourCanvas::Container (tempo_meta_group, ArdourCanvas::Duple (0.0, 0.0));
|
||||||
@ -1123,6 +1123,7 @@ Editor::color_handler()
|
|||||||
rubberband_rect->set_fill_color (UIConfiguration::instance().color_mod ("rubber band rect", "selection rect"));
|
rubberband_rect->set_fill_color (UIConfiguration::instance().color_mod ("rubber band rect", "selection rect"));
|
||||||
|
|
||||||
refresh_location_display ();
|
refresh_location_display ();
|
||||||
|
update_section_rects ();
|
||||||
|
|
||||||
NoteBase::set_colors ();
|
NoteBase::set_colors ();
|
||||||
|
|
||||||
|
@ -90,6 +90,10 @@ Editor::add_new_location (Location *location)
|
|||||||
if (location->is_auto_loop()) {
|
if (location->is_auto_loop()) {
|
||||||
update_loop_range_view ();
|
update_loop_range_view ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (location->is_section ()) {
|
||||||
|
update_section_rects ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Add a new location, without a time-consuming update of all marker labels;
|
/** Add a new location, without a time-consuming update of all marker labels;
|
||||||
@ -610,6 +614,43 @@ Editor::refresh_location_display ()
|
|||||||
update_marker_labels ();
|
update_marker_labels ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::update_section_rects ()
|
||||||
|
{
|
||||||
|
ENSURE_GUI_THREAD (*this, &Editor::update_section_rects);
|
||||||
|
if (!_session) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
section_marker_bar->clear (true);
|
||||||
|
|
||||||
|
timepos_t start;
|
||||||
|
timepos_t end;
|
||||||
|
|
||||||
|
Locations* loc = _session->locations ();
|
||||||
|
Location* l = NULL;
|
||||||
|
bool bright = false;
|
||||||
|
|
||||||
|
do {
|
||||||
|
l = loc->next_section (l, start, end);
|
||||||
|
if (l) {
|
||||||
|
double const left = sample_to_pixel (start.samples ());
|
||||||
|
double const right = sample_to_pixel (end.samples ());
|
||||||
|
|
||||||
|
ArdourCanvas::Rectangle* rect = new ArdourCanvas::Rectangle (section_marker_bar, ArdourCanvas::Rect (left, 2, right, timebar_height - 3));
|
||||||
|
rect->set_fill (true);
|
||||||
|
rect->set_outline_what(ArdourCanvas::Rectangle::What(0));
|
||||||
|
rect->raise_to_top ();
|
||||||
|
if (bright) {
|
||||||
|
rect->set_fill_color (UIConfiguration::instance().color ("arrangement rect"));
|
||||||
|
} else {
|
||||||
|
rect->set_fill_color (UIConfiguration::instance().color ("arrangement rect alt"));
|
||||||
|
}
|
||||||
|
bright = !bright;
|
||||||
|
|
||||||
|
}
|
||||||
|
} while (l);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::LocationMarkers::hide()
|
Editor::LocationMarkers::hide()
|
||||||
{
|
{
|
||||||
@ -911,6 +952,10 @@ Editor::location_gone (Location *location)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (location->is_section ()) {
|
||||||
|
update_section_rects ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -51,6 +51,8 @@
|
|||||||
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
||||||
<ColorAlias name="arrange base" alias="theme:bg"/>
|
<ColorAlias name="arrange base" alias="theme:bg"/>
|
||||||
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
||||||
|
<ColorAlias name="arrangement rect" alias="widget:blue"/>
|
||||||
|
<ColorAlias name="arrangement rect alt" alias="widget:blue darker"/>
|
||||||
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
||||||
<ColorAlias name="audio bus base" alias="widget:blue darker"/>
|
<ColorAlias name="audio bus base" alias="widget:blue darker"/>
|
||||||
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
||||||
|
@ -52,6 +52,8 @@
|
|||||||
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
||||||
<ColorAlias name="arrange base" alias="theme:bg"/>
|
<ColorAlias name="arrange base" alias="theme:bg"/>
|
||||||
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
||||||
|
<ColorAlias name="arrangement rect" alias="widget:blue"/>
|
||||||
|
<ColorAlias name="arrangement rect alt" alias="widget:blue darker"/>
|
||||||
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
||||||
<ColorAlias name="audio bus base" alias="widget:bg"/>
|
<ColorAlias name="audio bus base" alias="widget:bg"/>
|
||||||
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
||||||
|
@ -52,6 +52,8 @@
|
|||||||
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
||||||
<ColorAlias name="arrange base" alias="neutral:foreground2"/>
|
<ColorAlias name="arrange base" alias="neutral:foreground2"/>
|
||||||
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
||||||
|
<ColorAlias name="arrangement rect" alias="widget:blue"/>
|
||||||
|
<ColorAlias name="arrangement rect alt" alias="widget:blue darker"/>
|
||||||
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
||||||
<ColorAlias name="audio bus base" alias="widget:blue darker"/>
|
<ColorAlias name="audio bus base" alias="widget:blue darker"/>
|
||||||
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
||||||
|
@ -52,6 +52,8 @@
|
|||||||
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
||||||
<ColorAlias name="arrange base" alias="neutral:foreground"/>
|
<ColorAlias name="arrange base" alias="neutral:foreground"/>
|
||||||
<ColorAlias name="arrangement marker bar" alias="neutral:backgroundest"/>
|
<ColorAlias name="arrangement marker bar" alias="neutral:backgroundest"/>
|
||||||
|
<ColorAlias name="arrangement rect" alias="widget:blue"/>
|
||||||
|
<ColorAlias name="arrangement rect alt" alias="widget:blue darker"/>
|
||||||
<ColorAlias name="audio automation track fill" alias="theme:contrasting clock"/>
|
<ColorAlias name="audio automation track fill" alias="theme:contrasting clock"/>
|
||||||
<ColorAlias name="audio bus base" alias="widget:blue darker"/>
|
<ColorAlias name="audio bus base" alias="widget:blue darker"/>
|
||||||
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
||||||
|
@ -53,6 +53,8 @@
|
|||||||
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
||||||
<ColorAlias name="arrange base" alias="theme:bg"/>
|
<ColorAlias name="arrange base" alias="theme:bg"/>
|
||||||
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
||||||
|
<ColorAlias name="arrangement rect" alias="widget:blue"/>
|
||||||
|
<ColorAlias name="arrangement rect alt" alias="widget:blue darker"/>
|
||||||
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
||||||
<ColorAlias name="audio bus base" alias="widget:blue darker"/>
|
<ColorAlias name="audio bus base" alias="widget:blue darker"/>
|
||||||
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
||||||
|
@ -53,6 +53,8 @@
|
|||||||
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
||||||
<ColorAlias name="arrange base" alias="theme:bg"/>
|
<ColorAlias name="arrange base" alias="theme:bg"/>
|
||||||
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
||||||
|
<ColorAlias name="arrangement rect" alias="widget:blue"/>
|
||||||
|
<ColorAlias name="arrangement rect alt" alias="widget:blue darker"/>
|
||||||
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
||||||
<ColorAlias name="audio bus base" alias="widget:blue"/>
|
<ColorAlias name="audio bus base" alias="widget:blue"/>
|
||||||
<ColorAlias name="audio master bus base" alias="neutral:background"/>
|
<ColorAlias name="audio master bus base" alias="neutral:background"/>
|
||||||
|
@ -53,6 +53,8 @@
|
|||||||
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
||||||
<ColorAlias name="arrange base" alias="theme:bg"/>
|
<ColorAlias name="arrange base" alias="theme:bg"/>
|
||||||
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
||||||
|
<ColorAlias name="arrangement rect" alias="widget:blue"/>
|
||||||
|
<ColorAlias name="arrangement rect alt" alias="widget:blue darker"/>
|
||||||
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
||||||
<ColorAlias name="audio bus base" alias="widget:blue darker"/>
|
<ColorAlias name="audio bus base" alias="widget:blue darker"/>
|
||||||
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
||||||
|
@ -50,7 +50,9 @@
|
|||||||
<ColorAliases>
|
<ColorAliases>
|
||||||
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
||||||
<ColorAlias name="arrange base" alias="neutral:background2"/>
|
<ColorAlias name="arrange base" alias="neutral:background2"/>
|
||||||
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
||||||
|
<ColorAlias name="arrangement rect" alias="widget:blue"/>
|
||||||
|
<ColorAlias name="arrangement rect alt" alias="widget:blue darker"/>
|
||||||
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
||||||
<ColorAlias name="audio bus base" alias="neutral:background2"/>
|
<ColorAlias name="audio bus base" alias="neutral:background2"/>
|
||||||
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
||||||
|
@ -52,6 +52,8 @@
|
|||||||
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
<ColorAlias name="active crossfade" alias="neutral:foreground"/>
|
||||||
<ColorAlias name="arrange base" alias="theme:bg"/>
|
<ColorAlias name="arrange base" alias="theme:bg"/>
|
||||||
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
<ColorAlias name="arrangement marker bar" alias="neutral:background2"/>
|
||||||
|
<ColorAlias name="arrangement rect" alias="widget:blue"/>
|
||||||
|
<ColorAlias name="arrangement rect alt" alias="widget:blue darker"/>
|
||||||
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
|
||||||
<ColorAlias name="audio bus base" alias="neutral:background"/>
|
<ColorAlias name="audio bus base" alias="neutral:background"/>
|
||||||
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user