Option to colour region background using the track colour (#3759).
git-svn-id: svn://localhost/ardour2/branches/3.0@8778 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
ce9035388b
commit
b7ec5b4b40
|
@ -1049,6 +1049,14 @@ RCOptionEditor::RCOptionEditor ()
|
|||
sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_zoom_tools)
|
||||
));
|
||||
|
||||
add_option (_("Editor"),
|
||||
new BoolOption (
|
||||
"color-regions-using-track-color",
|
||||
_("Color regions using their track's color"),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::get_color_regions_using_track_color),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::set_color_regions_using_track_color)
|
||||
));
|
||||
|
||||
/* AUDIO */
|
||||
|
||||
add_option (_("Audio"), new OptionEditorHeading (_("Buffering")));
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
#include "ardour/types.h"
|
||||
#include "ardour/ardour.h"
|
||||
|
||||
#include <gtkmm2ext/utils.h>
|
||||
#include "gtkmm2ext/utils.h"
|
||||
#include "gtkmm2ext/gui_thread.h"
|
||||
|
||||
#include "ardour_ui.h"
|
||||
/*
|
||||
|
@ -224,6 +225,8 @@ TimeAxisViewItem::init (
|
|||
|
||||
set_duration (item_duration, this);
|
||||
set_position (start, this);
|
||||
|
||||
Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&TimeAxisViewItem::parameter_changed, this, _1), gui_context ());
|
||||
}
|
||||
|
||||
TimeAxisViewItem::~TimeAxisViewItem()
|
||||
|
@ -692,19 +695,20 @@ TimeAxisViewItem::set_frame_color()
|
|||
} else {
|
||||
if (_recregion) {
|
||||
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
|
||||
} else if (high_enough_for_name) {
|
||||
if (fill_opacity) {
|
||||
frame->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_FrameBase.get(), fill_opacity);
|
||||
} else {
|
||||
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_FrameBase.get();
|
||||
}
|
||||
} else {
|
||||
if (fill_opacity) {
|
||||
frame->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (fill_color, fill_opacity);
|
||||
uint32_t f = 0;
|
||||
if (high_enough_for_name && !Config->get_color_regions_using_track_color()) {
|
||||
f = ARDOUR_UI::config()->canvasvar_FrameBase.get();
|
||||
} else {
|
||||
frame->property_fill_color_rgba() = fill_color;
|
||||
f = fill_color;
|
||||
}
|
||||
}
|
||||
|
||||
if (fill_opacity) {
|
||||
f = UINT_RGBA_CHANGE_A (f, fill_opacity);
|
||||
}
|
||||
|
||||
frame->property_fill_color_rgba() = f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -900,3 +904,10 @@ TimeAxisViewItem::update_name_pixbuf_visibility ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
TimeAxisViewItem::parameter_changed (string p)
|
||||
{
|
||||
if (p == "color-regions-using-track-color") {
|
||||
set_frame_color ();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -235,6 +235,10 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
|
|||
Visibility visibility;
|
||||
bool _recregion;
|
||||
bool _automation; ///< true if this is an automation region view
|
||||
|
||||
private:
|
||||
|
||||
void parameter_changed (std::string);
|
||||
|
||||
}; /* class TimeAxisViewItem */
|
||||
|
||||
|
|
|
@ -160,6 +160,7 @@ CONFIG_VARIABLE (WaveformScale, waveform_scale, "waveform-scale", Linear)
|
|||
CONFIG_VARIABLE (WaveformShape, waveform_shape, "waveform-shape", Traditional)
|
||||
CONFIG_VARIABLE (bool, allow_special_bus_removal, "allow-special-bus-removal", false)
|
||||
CONFIG_VARIABLE (int32_t, processor_usage, "processor-usage", -1)
|
||||
CONFIG_VARIABLE (bool, color_regions_using_track_color, "color-regions-using-track-color", false)
|
||||
|
||||
/* denormal management */
|
||||
|
||||
|
|
Loading…
Reference in New Issue