Compare commits

...

6 Commits

7 changed files with 69 additions and 32 deletions

View File

@ -4520,6 +4520,7 @@ MarkerDrag::motion (GdkEvent* event, bool)
} else {
switch (_marker->type ()) {
case ArdourMarker::SessionStart:
case ArdourMarker::Section:
case ArdourMarker::RangeStart:
case ArdourMarker::LoopStart:
case ArdourMarker::PunchIn:

View File

@ -133,7 +133,7 @@ Editor::add_new_location_internal (Location* location)
lam->start->set_cue_index(location->cue_id());
group = cue_marker_group;
} else if (location->is_section()) {
lam->start = new ArdourMarker (*this, *section_marker_group, color, location->name(), ArdourMarker::Mark, location->start());
lam->start = new ArdourMarker (*this, *section_marker_group, color, location->name(), ArdourMarker::Section, location->start());
group = section_marker_group;
} else {
lam->start = new ArdourMarker (*this, *marker_group, color, location->name(), ArdourMarker::Mark, location->start());
@ -184,9 +184,11 @@ Editor::add_new_location_internal (Location* location)
}
}
#if 0
if (location->position_time_domain() == Temporal::BeatTime) {
lam->set_name (string_compose ("%1%2", u8"\u266B", location->name ())); // BEAMED EIGHTH NOTES
}
#endif
if (location->is_hidden ()) {
lam->hide();
@ -476,6 +478,8 @@ void Editor::ensure_marker_updated (LocationMarkers* lam, Location* location)
reparent_location_markers (lam, cd_marker_group);
} else if (location->is_section()) {
reparent_location_markers (lam, section_marker_group);
} else if (location->is_cue_marker()) {
reparent_location_markers (lam, cue_marker_group);
} else if (location->is_mark() || location->matches (Location::Flags(0))) {
reparent_location_markers (lam, marker_group);
}
@ -624,13 +628,17 @@ Editor::update_section_rects ()
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));
Editor::LocationMarkers* markers = find_location_markers (l);
ArdourCanvas::Rectangle* rect = new ArdourCanvas::Rectangle (section_marker_bar, ArdourCanvas::Rect (left, 1, right, timebar_height));
rect->set_fill (true);
rect->set_outline_what(ArdourCanvas::Rectangle::What(0));
rect->raise_to_top ();
if (bright) {
markers->set_color("arrangement rect");
rect->set_fill_color (UIConfiguration::instance().color ("arrangement rect"));
} else {
markers->set_color("arrangement rect alt");
rect->set_fill_color (UIConfiguration::instance().color ("arrangement rect alt"));
}
bright = !bright;

View File

@ -178,9 +178,9 @@ Editor::initialize_rulers ()
lab_children.push_back (Element(range_mark_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(transport_mark_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(cd_mark_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(section_mark_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(mark_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(cue_mark_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(section_mark_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(videotl_label, PACK_SHRINK, PACK_START));
/* 1 event handler to bind them all ... */
@ -624,26 +624,6 @@ Editor::update_ruler_visibility ()
update_marker_display();
}
if (ruler_section_action->get_active()) {
old_unit_pos = section_marker_group->position().y;
if (tbpos != old_unit_pos) {
section_marker_group->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
}
section_marker_group->show();
section_mark_label.show();
section_marker_bar->set_outline(false);
tbpos += timebar_height;
tbgpos += timebar_height;
visible_timebars++;
update_marker_display();
} else {
section_marker_group->hide();
section_mark_label.hide();
update_marker_display();
}
if (ruler_marker_action->get_active()) {
old_unit_pos = marker_group->position().y;
if (tbpos != old_unit_pos) {
@ -680,6 +660,26 @@ Editor::update_ruler_visibility ()
cue_mark_label.hide();
}
if (ruler_section_action->get_active()) {
old_unit_pos = section_marker_group->position().y;
if (tbpos != old_unit_pos) {
section_marker_group->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
}
section_marker_group->show();
section_mark_label.show();
section_marker_bar->set_outline(false);
tbpos += timebar_height;
tbgpos += timebar_height;
visible_timebars++;
update_marker_display();
} else {
section_marker_group->hide();
section_mark_label.hide();
update_marker_display();
}
if (ruler_video_action->get_active()) {
old_unit_pos = videotl_group->position().y;
if (tbpos != old_unit_pos) {

View File

@ -235,6 +235,16 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Item& parent, std::s
_label_offset = 8.0 * scale;
break;
case Section:
points = new ArdourCanvas::Points (); //unused
points->push_back (ArdourCanvas::Duple ( 0.0, 0.0));
points->push_back (ArdourCanvas::Duple (M6 + .5, MH * .5));
points->push_back (ArdourCanvas::Duple ( 0.0, MH));
points->push_back (ArdourCanvas::Duple ( 0.0, 0.0));
_shift = 0 * scale;
_label_offset = 4.0 * scale;
break;
case PunchOut: /* fallthrough */
case LoopEnd: /* fallthrough */
@ -331,6 +341,13 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Item& parent, std::s
_pcue->hide();
_pmark->show();
break;
case Section:
_pmark->hide();
_pcue->hide();
if (_name_flag) {
_name_flag->show();
}
break;
case Cue:
_pcue->set_outline(false);
_pcue->set_fill(true);
@ -365,7 +382,11 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Item& parent, std::s
_name_item->set_font_description (name_font);
_name_item->set_color (RGBA_TO_UINT (0,0,0,255));
_name_item->set_position (ArdourCanvas::Duple (_label_offset, floor (.5 * (name_height - name_descent - .5))));
if (_type==Section) {
_name_item->set_position (ArdourCanvas::Duple (_label_offset, 0.5 * marker_height - ceil (.5 * (name_height))));
} else {
_name_item->set_position (ArdourCanvas::Duple (_label_offset, floor (.5 * (name_height - name_descent - .5))));
}
apply_color ();
@ -551,6 +572,11 @@ ArdourMarker::setup_name_display ()
pixel_size (_name, name_font, name_width, name_height);
name_width = min ((double) name_width + padding, limit);
if (_name_flag) {
_name_flag->set_y0 (0);
_name_flag->set_y1 (marker_height - padding);
}
if (name_width == 0) {
_name_item->hide ();
} else {
@ -605,6 +631,11 @@ ArdourMarker::setup_name_display ()
_name_flag->set_x0 (M3);
_name_flag->set_x1 (_name_item->position().x + name_width + padding + 1*scale);
break;
case Section:
_name_flag->set_x0 (0);
_name_flag->set_x1 (_name_item->position().x + name_width + padding);
_name_flag->set_y1 (marker_height); //full height
break;
default:
_name_flag->set_x0 (0);
_name_flag->set_x1 (_name_item->position().x + name_width + padding);
@ -613,11 +644,6 @@ ArdourMarker::setup_name_display ()
}
}
}
if (_name_flag) {
_name_flag->set_y0 (0);
_name_flag->set_y1 (marker_height - padding);
}
}
void

View File

@ -62,6 +62,7 @@ public:
BBTPosition,
SessionStart, ///< session start
SessionEnd, ///< session end
Section,
RangeStart,
RangeEnd,
LoopStart,

View File

@ -38,9 +38,9 @@ RulerDialog::RulerDialog ()
get_vbox()->pack_start (range_button);
get_vbox()->pack_start (loop_punch_button);
get_vbox()->pack_start (cdmark_button);
get_vbox()->pack_start (section_button);
get_vbox()->pack_start (mark_button);
get_vbox()->pack_start (cuemark_button);
get_vbox()->pack_start (section_button);
get_vbox()->pack_start (video_button);
get_vbox()->show_all ();
@ -55,8 +55,8 @@ RulerDialog::RulerDialog ()
connect_action (range_button, "range-ruler");
connect_action (mark_button, "marker-ruler");
connect_action (cdmark_button, "cd-marker-ruler");
connect_action (section_button, "arrangement-ruler");
connect_action (cuemark_button, "cue-marker-ruler");
connect_action (section_button, "arrangement-ruler");
connect_action (video_button, "video-ruler");
}

View File

@ -26,6 +26,7 @@
<Color name="neutral:foregroundest" value="ffffffff"/> <!--grid line major-->
<Color name="widget:bg" value="4F4D4Dff"/> <!--generic button-->
<Color name="widget:blue" value="526d94ff"/> <!--processor fader: fill-->
<Color name="widget:blue lighter" value="628db4ff"/> <!--processor fader: fill-->
<Color name="widget:blue darker" value="20242aff"/> <!--gtk_audio_bus-->
<Color name="widget:gray" value="595755ff"/> <!--gtk_processor fader-->
<Color name="widget:green" value="617552ff"/> <!--gtk processor postfader, gtk_midi_track-->
@ -54,7 +55,7 @@
<ColorAlias name="arrange base" alias="theme:bg"/>
<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="arrangement rect alt" alias="widget:blue lighter"/>
<ColorAlias name="audio automation track fill" alias="theme:bg"/>
<ColorAlias name="audio bus base" alias="widget:blue darker"/>
<ColorAlias name="audio master bus base" alias="neutral:backgroundest"/>