mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 15:37:48 +01:00
[Summary] Do not paint waveform and paint region in black if region is muted
[Feature reviewed] Igor Maximenko, AMishyn [Reviewed] YPozdnyakov
This commit is contained in:
parent
28b7e75164
commit
bf1e098b2c
7 changed files with 29 additions and 6 deletions
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
#include "i18n.h"
|
||||
|
||||
#define MUTED_ALPHA 255 //VK: 48
|
||||
#define MUTED_ALPHA 0 // NP: do not show waveform if region is muted
|
||||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
|
|
@ -1393,8 +1393,9 @@ AudioRegionView::set_some_waveform_colors (vector<ArdourCanvas::WaveView*>& wave
|
|||
if (_selected) {
|
||||
if (_region->muted()) {
|
||||
/* hide outline with zero alpha */
|
||||
outline = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->get_canvasvar_SelectedWaveForm(), 0);
|
||||
fill = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->get_canvasvar_SelectedWaveFormFill(), MUTED_ALPHA);
|
||||
outline = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->get_canvasvar_SelectedWaveForm(), MUTED_ALPHA);
|
||||
zero = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->get_canvasvar_SelectedWaveForm(), MUTED_ALPHA);
|
||||
fill = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->get_canvasvar_SelectedWaveForm(), MUTED_ALPHA);
|
||||
} else {
|
||||
outline = ARDOUR_UI::config()->get_canvasvar_SelectedWaveForm();
|
||||
fill = ARDOUR_UI::config()->get_canvasvar_SelectedWaveFormFill();
|
||||
|
|
@ -1413,7 +1414,8 @@ AudioRegionView::set_some_waveform_colors (vector<ArdourCanvas::WaveView*>& wave
|
|||
} else {
|
||||
if (_region->muted()) {
|
||||
/* hide outline with zero alpha */
|
||||
outline = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->get_canvasvar_WaveForm(), 0);
|
||||
outline = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->get_canvasvar_WaveForm(), 0);
|
||||
zero = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->get_canvasvar_ZeroLine(), MUTED_ALPHA);
|
||||
fill = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->get_canvasvar_WaveFormFill(), MUTED_ALPHA);
|
||||
} else {
|
||||
outline = ARDOUR_UI::config()->get_canvasvar_WaveForm();
|
||||
|
|
|
|||
|
|
@ -203,6 +203,7 @@ CANVAS_VARIABLE(canvasvar_WaveFormClip, "clipped waveform")
|
|||
CANVAS_VARIABLE(canvasvar_WaveFormFill, "waveform fill")
|
||||
CANVAS_VARIABLE(canvasvar_ZeroLine, "zero line")
|
||||
CANVAS_VARIABLE(canvasvar_ZoomRect, "zoom rect")
|
||||
CANVAS_VARIABLE(canvasvar_MutedRegionFill, "muted region fill")
|
||||
CANVAS_VARIABLE(canvasvar_MonitorSectionKnob, "monitor knob")
|
||||
|
||||
CANVAS_VARIABLE(canvasvar_ButtonBorder, "border color")
|
||||
|
|
|
|||
|
|
@ -194,6 +194,7 @@
|
|||
<Option name="waveform fill" value="ffffffff"/>
|
||||
<Option name="zero line" value="ffffffff"/>
|
||||
<Option name="zoom rect" value="c6d1b26d"/>
|
||||
<Option name="muted region fill" value="000000ff"/>
|
||||
<Option name="monitor knob" value="329edfff"/>
|
||||
<Option name="button border" value="000000f0"/>
|
||||
<Option name="border color" value="00000000"/>
|
||||
|
|
|
|||
|
|
@ -438,7 +438,13 @@ RegionView::reset_width_dependent_items (double pixel_width)
|
|||
void
|
||||
RegionView::region_muted ()
|
||||
{
|
||||
set_frame_color ();
|
||||
if ( _region->muted() ) {
|
||||
TimeAxisViewItem::set_color ( ARDOUR_UI::config()->get_canvasvar_MutedRegionFill () );
|
||||
} else {
|
||||
TimeAxisViewItem::restore_color_after_mute ();
|
||||
set_frame_color ();
|
||||
}
|
||||
|
||||
region_renamed ();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -392,7 +392,10 @@ StreamView::apply_color (uint32_t color, ColorTarget target)
|
|||
case RegionColor:
|
||||
region_color = color;
|
||||
for (i = region_views.begin(); i != region_views.end(); ++i) {
|
||||
(*i)->set_color (region_color);
|
||||
if ( !(*i)->region()->muted() )
|
||||
(*i)->set_color (region_color);
|
||||
else
|
||||
(*i)->set_route_time_axis_view_color (region_color);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@ TimeAxisViewItem::init (ArdourCanvas::Item* parent, double fpp, uint32_t base_co
|
|||
group->Event.connect (sigc::mem_fun (*this, &TimeAxisViewItem::canvas_group_event));
|
||||
|
||||
fill_color = base_color;
|
||||
_route_time_axis_view_color = base_color;
|
||||
samples_per_pixel = fpp;
|
||||
frame_position = start;
|
||||
item_duration = duration;
|
||||
|
|
@ -839,6 +840,12 @@ TimeAxisViewItem::manage_sr_highlight ()
|
|||
manage_sr_text ();
|
||||
}
|
||||
|
||||
void
|
||||
TimeAxisViewItem::restore_color_after_mute ()
|
||||
{
|
||||
fill_color = _route_time_axis_view_color;
|
||||
set_colors ();
|
||||
}
|
||||
|
||||
void
|
||||
TimeAxisViewItem::set_color (uint32_t base_color)
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
|
|||
virtual double height() const { return _height; }
|
||||
void set_y (double);
|
||||
void set_color (uint32_t);
|
||||
void set_route_time_axis_view_color (uint32_t color) { _route_time_axis_view_color = color;}
|
||||
void set_name_text_color ();
|
||||
|
||||
uint32_t get_fill_color () const;
|
||||
|
|
@ -192,6 +193,7 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
|
|||
virtual void update_color();
|
||||
virtual void set_frame_gradient ();
|
||||
void set_trim_handle_colors();
|
||||
void restore_color_after_mute ();
|
||||
|
||||
void set_ioconfig_text(const std::string&);
|
||||
void set_sr_text(const std::string&s);
|
||||
|
|
@ -245,6 +247,7 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
|
|||
virtual uint32_t fill_opacity() const;
|
||||
|
||||
uint32_t fill_color;
|
||||
uint32_t _route_time_axis_view_color;
|
||||
uint32_t name_highlight_color;
|
||||
uint32_t sr_highlight_color;
|
||||
uint32_t ioconfig_highlight_color;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue