if (audio_region()->fade_in_active()) {
start_xfade_rect->set_fill (false);
} else {
- start_xfade_rect->set_fill_color (ARDOUR_UI::config()->color ("inactive crossfade"));
+ start_xfade_rect->set_fill_color (ARDOUR_UI::config()->color_mod ("inactive crossfade", "inactive crossfade"));
start_xfade_rect->set_fill (true);
}
}
if (audio_region()->fade_out_active()) {
end_xfade_rect->set_fill (false);
} else {
- end_xfade_rect->set_fill_color (ARDOUR_UI::config()->color ("inactive crossfade"));
+ end_xfade_rect->set_fill_color (ARDOUR_UI::config()->color_mod ("inactive crossfade", "inactive crossfade"));
end_xfade_rect->set_fill (true);
}
}
if (fade_in_handle->visible()) {
//see comment for drag_start
- entered(false);
+ entered();
}
if (pwidth < 5) {
if (fade_out_handle->visible()) {
//see comment for drag_start
- entered(false);
+ entered();
}
/* don't show shape if its too small */
effective_height = _height - 1.0;
- if (Config->get_show_name_highlight() && effective_height >= NAME_HIGHLIGHT_THRESH) {
+ if (ARDOUR_UI::config()->get_show_name_highlight() && effective_height >= NAME_HIGHLIGHT_THRESH) {
effective_height -= NAME_HIGHLIGHT_SIZE;
}
{
RegionView::set_samples_per_pixel (fpp);
- if (Config->get_show_waveforms ()) {
+ if (ARDOUR_UI::config()->get_show_waveforms ()) {
for (uint32_t n = 0; n < waves.size(); ++n) {
waves[n]->set_samples_per_pixel (fpp);
}
void
AudioRegionView::setup_waveform_visibility ()
{
- if (Config->get_show_waveforms ()) {
+ if (ARDOUR_UI::config()->get_show_waveforms ()) {
for (uint32_t n = 0; n < waves.size(); ++n) {
/* make sure the zoom level is correct, since we don't update
this when waveforms are hidden.
return;
}
- if (Config->get_show_region_gain() || trackview.editor().current_mouse_mode() == Editing::MouseDraw || trackview.editor().current_mouse_mode() == Editing::MouseRange ) {
- gain_line->add_visibility (AutomationLine::Line);
+ if (ARDOUR_UI::config()->get_show_region_gain() || trackview.editor().current_mouse_mode() == Editing::MouseDraw || trackview.editor().current_mouse_mode() == Editing::MouseRange ) {
+ gain_line->set_visibility (AutomationLine::VisibleAspects(AutomationLine::ControlPoints|AutomationLine::Line));
+ gain_line->canvas_group().raise_to_top ();
+
} else {
- gain_line->hide ();
+ gain_line->set_visibility (AutomationLine::VisibleAspects(0));
}
}
wave->set_height (ht);
wave->set_samples_per_pixel (samples_per_pixel);
wave->set_show_zero_line (true);
- wave->set_clip_level (Config->get_waveform_clip_level ());
-
+ wave->set_clip_level (ARDOUR_UI::config()->get_waveform_clip_level ());
+ wave->set_start_shift (1.0);
+
wave->Event.connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_wave_view_event), wave, this));
- switch (Config->get_waveform_shape()) {
+ switch (ARDOUR_UI::config()->get_waveform_shape()) {
case Rectified:
wave->set_shape (WaveView::Rectified);
break;
wave->set_shape (WaveView::Normal);
}
- wave->set_logscaled (Config->get_waveform_scale() == Logarithmic);
+ wave->set_logscaled (ARDOUR_UI::config()->get_waveform_scale() == Logarithmic);
vector<ArdourCanvas::WaveView*> v;
v.push_back (wave);
set_some_waveform_colors (v);
- if (!Config->get_show_waveforms ()) {
+ if (!ARDOUR_UI::config()->get_show_waveforms ()) {
wave->hide();
}
can represent automation data with it.
*/
- trackview.session()->begin_reversible_command (_("add gain control point"));
+ trackview.editor().begin_reversible_command (_("add gain control point"));
XMLNode &before = audio_region()->envelope()->get_state();
if (!audio_region()->envelope_active()) {
XMLNode &after = audio_region()->envelope()->get_state();
trackview.session()->add_command (new MementoCommand<AutomationList>(*audio_region()->envelope().get(), &before, &after));
- trackview.session()->commit_reversible_command ();
+ trackview.editor().commit_reversible_command ();
}
void
}
void
-AudioRegionView::entered (bool internal_editing)
+AudioRegionView::entered ()
{
trackview.editor().set_current_trimmable (_region);
trackview.editor().set_current_movable (_region);
-
- if (gain_line) {
- /* these may or may not be visible depending on mouse mode */
- gain_line->add_visibility (AutomationLine::ControlPoints);
- }
- if (!internal_editing && ( trackview.editor().current_mouse_mode() == Editing::MouseObject ) ) {
+ update_envelope_visibility();
+
+ if ((trackview.editor().current_mouse_mode() == Editing::MouseObject)) {
if (start_xfade_rect) {
start_xfade_rect->set_outline (true);
}
// if fade_in_trim_handle or fade_out_trim_handle should
// be visible. -- If the fade_in_handle is visible
// we have focus and are not in internal edit mode.
- entered(false);
+ entered();
}
}