, trim_fade_in_drag_active(false)
, trim_fade_out_drag_active(false)
{
- Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&AudioRegionView::parameter_changed, this, _1), gui_context());
+ ARDOUR_UI::config()->ParameterChanged.connect (sigc::mem_fun (*this, &AudioRegionView::parameter_changed));
}
AudioRegionView::AudioRegionView (ArdourCanvas::Container *parent, RouteTimeAxisView &tv, boost::shared_ptr<AudioRegion> r, double spu,
, trim_fade_in_drag_active(false)
, trim_fade_out_drag_active(false)
{
- Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&AudioRegionView::parameter_changed, this, _1), gui_context());
+ ARDOUR_UI::config()->ParameterChanged.connect (sigc::mem_fun (*this, &AudioRegionView::parameter_changed));
}
AudioRegionView::AudioRegionView (const AudioRegionView& other, boost::shared_ptr<AudioRegion> other_region)
{
init (true);
- Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&AudioRegionView::parameter_changed, this, _1), gui_context());
+ ARDOUR_UI::config()->ParameterChanged.connect (sigc::mem_fun (*this, &AudioRegionView::parameter_changed));
}
void
uint32_t wcnt = waves.size();
- for (uint32_t n = 0; n < wcnt; ++n) {
- gdouble ht;
+ if (wcnt > 0) {
- if (height < NAME_HIGHLIGHT_THRESH) {
- ht = ((height - 2 * wcnt) / (double) wcnt);
+ gdouble ht;
+
+ if (!ARDOUR_UI::config()->get_show_name_highlight() || (height < NAME_HIGHLIGHT_THRESH)) {
+ ht = height / (double) wcnt;
} else {
- ht = (((height - 2 * wcnt) - NAME_HIGHLIGHT_SIZE) / (double) wcnt);
+ ht = (height - NAME_HIGHLIGHT_SIZE) / (double) wcnt;
+ }
+
+ for (uint32_t n = 0; n < wcnt; ++n) {
+
+ gdouble yoff = floor (ht * n);
+
+ waves[n]->set_height (ht);
+ waves[n]->set_y_position (yoff);
}
-
- gdouble yoff = n * (ht + 1);
-
- waves[n]->set_height (ht);
- waves[n]->set_y_position (yoff + 2);
}
if (gain_line) {
uint32_t nwaves = std::min (nchans, audio_region()->n_channels());
gdouble ht;
+ /* reduce waveview height by 2.0 to account for our frame */
+
if (trackview.current_height() < NAME_HIGHLIGHT_THRESH) {
- ht = ((trackview.current_height()) / (double) nchans);
+ ht = ((trackview.current_height() - 2.0) / (double) nchans);
} else {
- ht = ((trackview.current_height() - NAME_HIGHLIGHT_SIZE) / (double) nchans);
+ ht = ((trackview.current_height() - NAME_HIGHLIGHT_SIZE - 2.0) / (double) nchans);
}
+ /* first waveview starts at 1.0, not 0.0 since that will overlap the
+ * frame
+ */
+
gdouble yoff = which * ht;
WaveView *wave = new WaveView (group, audio_region ());