restore zero line visibility; change selected region colors back to 2.X version
git-svn-id: svn://localhost/ardour2/branches/3.0@9157 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
4fc42bca44
commit
b9113772fe
@ -97,8 +97,8 @@
|
||||
<Option name="silence text" value="0e066cff"/>
|
||||
<Option name="selected crossfade editor line" value="00dbdbff"/>
|
||||
<Option name="selected crossfade editor wave" value="f9ea14a0"/>
|
||||
<Option name="selected region base" value="51518aa0"/>
|
||||
<Option name="selected waveform fill" value="88c6d8c8"/>
|
||||
<Option name="selected region base" value="51518aff"/>
|
||||
<Option name="selected waveform fill" value="51518ac8"/>
|
||||
<Option name="selected waveform outline" value="0f0f0fcc"/>
|
||||
<Option name="selection rect" value="e8f4d377"/>
|
||||
<Option name="selection" value="636363b2"/>
|
||||
@ -124,7 +124,7 @@
|
||||
<Option name="tempo bar" value="70727fff"/>
|
||||
<Option name="tempo marker" value="f2425bff"/>
|
||||
<Option name="time axis frame" value="000000ff"/>
|
||||
<Option name="selected time axis frame" value="ff0000ff"/>
|
||||
<Option name="selected time axis frame" value="000000ff"/>
|
||||
<Option name="time stretch fill" value="e2b5b596"/>
|
||||
<Option name="time stretch outline" value="63636396"/>
|
||||
<Option name="transport drag rect" value="969696c6"/>
|
||||
@ -139,7 +139,7 @@
|
||||
<Option name="waveform outline" value="0f0f0fc8"/>
|
||||
<Option name="clipped waveform" value="ff0000e5"/>
|
||||
<Option name="waveform fill" value="3d4753dc"/>
|
||||
<Option name="zero line" value="b5b5b5ff"/>
|
||||
<Option name="zero line" value="b5b5b525"/>
|
||||
<Option name="zoom rect" value="c6d1b26d"/>
|
||||
</Canvas>
|
||||
</Ardour>
|
||||
|
@ -68,7 +68,6 @@ AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView
|
||||
Gdk::Color const & basic_color)
|
||||
: RegionView (parent, tv, r, spu, basic_color)
|
||||
, sync_mark(0)
|
||||
, zero_line(0)
|
||||
, fade_in_shape(0)
|
||||
, fade_out_shape(0)
|
||||
, fade_in_handle(0)
|
||||
@ -86,7 +85,6 @@ AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView
|
||||
Gdk::Color const & basic_color, bool recording, TimeAxisViewItem::Visibility visibility)
|
||||
: RegionView (parent, tv, r, spu, basic_color, recording, visibility)
|
||||
, sync_mark(0)
|
||||
, zero_line(0)
|
||||
, fade_in_shape(0)
|
||||
, fade_out_shape(0)
|
||||
, fade_in_handle(0)
|
||||
@ -103,7 +101,6 @@ AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView
|
||||
AudioRegionView::AudioRegionView (const AudioRegionView& other)
|
||||
: sigc::trackable(other)
|
||||
, RegionView (other)
|
||||
, zero_line(0)
|
||||
, fade_in_shape(0)
|
||||
, fade_out_shape(0)
|
||||
, fade_in_handle(0)
|
||||
@ -125,7 +122,6 @@ AudioRegionView::AudioRegionView (const AudioRegionView& other)
|
||||
|
||||
AudioRegionView::AudioRegionView (const AudioRegionView& other, boost::shared_ptr<AudioRegion> other_region)
|
||||
: RegionView (other, boost::shared_ptr<Region> (other_region))
|
||||
, zero_line(0)
|
||||
, fade_in_shape(0)
|
||||
, fade_out_shape(0)
|
||||
, fade_in_handle(0)
|
||||
@ -156,7 +152,6 @@ AudioRegionView::init (Gdk::Color const & basic_color, bool wfd)
|
||||
XMLNode *node;
|
||||
|
||||
_amplitude_above_axis = 1.0;
|
||||
zero_line = 0;
|
||||
_flags = 0;
|
||||
|
||||
if ((node = _region->extra_xml ("GUI")) != 0) {
|
||||
@ -426,10 +421,6 @@ AudioRegionView::reset_width_dependent_items (double pixel_width)
|
||||
RegionView::reset_width_dependent_items(pixel_width);
|
||||
assert(_pixel_width == pixel_width);
|
||||
|
||||
if (zero_line) {
|
||||
zero_line->property_x2() = pixel_width - 1.0;
|
||||
}
|
||||
|
||||
if (fade_in_handle) {
|
||||
if (pixel_width <= 6.0 || _height < 5.0 || !trackview.session()->config.get_show_region_fades()) {
|
||||
fade_in_handle->hide();
|
||||
@ -529,7 +520,6 @@ AudioRegionView::set_height (gdouble height)
|
||||
gain_line->set_height ((uint32_t) rint (height - NAME_HIGHLIGHT_SIZE) - 2);
|
||||
}
|
||||
|
||||
manage_zero_line ();
|
||||
reset_fade_shapes ();
|
||||
|
||||
/* Update hights for any active feature lines */
|
||||
@ -562,23 +552,6 @@ AudioRegionView::set_height (gdouble height)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionView::manage_zero_line ()
|
||||
{
|
||||
if (!zero_line) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_height >= 100) {
|
||||
double const wave_midpoint = (_height - NAME_HIGHLIGHT_SIZE) / 2.0;
|
||||
zero_line->property_y1() = wave_midpoint;
|
||||
zero_line->property_y2() = wave_midpoint;
|
||||
zero_line->show();
|
||||
} else {
|
||||
zero_line->hide();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionView::reset_fade_shapes ()
|
||||
{
|
||||
@ -976,6 +949,7 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/)
|
||||
|
||||
wave->property_clip_color() = ARDOUR_UI::config()->canvasvar_WaveFormClip.get();
|
||||
wave->property_zero_color() = ARDOUR_UI::config()->canvasvar_ZeroLine.get();
|
||||
wave->property_zero_line() = true;
|
||||
wave->property_region_start() = _region->start();
|
||||
wave->property_rectified() = (bool) (_flags & WaveformRectified);
|
||||
wave->property_logscaled() = (bool) (_flags & WaveformLogScaled);
|
||||
@ -1014,16 +988,6 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/)
|
||||
/* all waves created, don't hook into peaks ready anymore */
|
||||
delete _data_ready_connections[which];
|
||||
_data_ready_connections[which] = 0;
|
||||
|
||||
#if 0
|
||||
if (!zero_line) {
|
||||
zero_line = new ArdourCanvas::SimpleLine (*group);
|
||||
zero_line->property_x1() = (gdouble) 1.0;
|
||||
zero_line->property_x2() = (gdouble) (_region->length() / samples_per_unit) - 1.0;
|
||||
zero_line->property_color_rgba() = (guint) ARDOUR_UI::config()->canvasvar_ZeroLine.get();
|
||||
manage_zero_line ();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -1161,14 +1125,6 @@ AudioRegionView::set_waveform_shape (WaveformShape shape)
|
||||
(*wave)->property_rectified() = yn;
|
||||
}
|
||||
|
||||
if (zero_line) {
|
||||
if (yn) {
|
||||
zero_line->hide();
|
||||
} else {
|
||||
zero_line->show();
|
||||
}
|
||||
}
|
||||
|
||||
if (yn) {
|
||||
_flags |= WaveformRectified;
|
||||
} else {
|
||||
@ -1340,7 +1296,11 @@ AudioRegionView::set_frame_color ()
|
||||
uint32_t fc;
|
||||
|
||||
if (_selected) {
|
||||
wc = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->canvasvar_SelectedWaveForm.get(), MUTED_ALPHA);
|
||||
if (_region->muted()) {
|
||||
wc = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->canvasvar_SelectedWaveForm.get(), MUTED_ALPHA);
|
||||
} else {
|
||||
wc = ARDOUR_UI::config()->canvasvar_SelectedWaveForm.get();
|
||||
}
|
||||
fc = ARDOUR_UI::config()->canvasvar_SelectedWaveFormFill.get();
|
||||
} else {
|
||||
if (_recregion) {
|
||||
@ -1348,15 +1308,15 @@ AudioRegionView::set_frame_color ()
|
||||
wc = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->canvasvar_RecWaveForm.get(), MUTED_ALPHA);
|
||||
} else {
|
||||
wc = ARDOUR_UI::config()->canvasvar_RecWaveForm.get();
|
||||
fc = ARDOUR_UI::config()->canvasvar_RecWaveFormFill.get();
|
||||
}
|
||||
fc = ARDOUR_UI::config()->canvasvar_RecWaveFormFill.get();
|
||||
} else {
|
||||
if (_region->muted()) {
|
||||
wc = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->canvasvar_WaveForm.get(), MUTED_ALPHA);
|
||||
} else {
|
||||
wc = ARDOUR_UI::config()->canvasvar_WaveForm.get();
|
||||
fc = ARDOUR_UI::config()->canvasvar_WaveFormFill.get();
|
||||
}
|
||||
fc = ARDOUR_UI::config()->canvasvar_WaveFormFill.get();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,6 @@ class AudioRegionView : public RegionView
|
||||
std::list<std::pair<framepos_t, ArdourCanvas::Line*> > feature_lines;
|
||||
|
||||
ArdourCanvas::Polygon* sync_mark; ///< polgyon for sync position
|
||||
ArdourCanvas::SimpleLine* zero_line;
|
||||
ArdourCanvas::Polygon* fade_in_shape;
|
||||
ArdourCanvas::Polygon* fade_out_shape;
|
||||
ArdourCanvas::SimpleRect* fade_in_handle; ///< fade in handle, or 0
|
||||
@ -167,7 +166,6 @@ class AudioRegionView : public RegionView
|
||||
void region_renamed ();
|
||||
|
||||
void create_one_wave (uint32_t, bool);
|
||||
void manage_zero_line ();
|
||||
void peaks_ready_handler (uint32_t);
|
||||
void set_flags (XMLNode *);
|
||||
void store_flags ();
|
||||
|
@ -1618,12 +1618,11 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
|
||||
}
|
||||
}
|
||||
|
||||
if (!waveview->rectified && waveview->zero_line) {
|
||||
if (!waveview->rectified && waveview->zero_line && waveview->height >= 100) {
|
||||
// Paint zeroline.
|
||||
//PAINT_HORIZA(buf, waveview->zero_r, waveview->zero_g, waveview->zero_b, waveview->zero_a, begin, endi-1, origin );
|
||||
|
||||
unsigned char zero_r, zero_g, zero_b, zero_a;
|
||||
UINT_TO_RGBA( waveview->zero_color, &zero_r, &zero_g, &zero_b, &zero_a );
|
||||
UINT_TO_RGBA( waveview->zero_color, &zero_r, &zero_g, &zero_b, &zero_a);
|
||||
int zeroline_y = (int) rint ((item->y1 + origin) * item->canvas->pixels_per_unit);
|
||||
PAINT_HORIZA(buf, zero_r, zero_g, zero_b, zero_a, zbegin, zend, zeroline_y);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user