Moved canvas colors and theme file selection into new ui specific config system
git-svn-id: svn://localhost/ardour2/trunk@2086 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
a67dcdc267
commit
4c000c13ee
85
ardour.rc.in
85
ardour.rc.in
|
@ -37,92 +37,7 @@
|
|||
<Option name="destructive-xfade-msecs" value="20"/>
|
||||
<Option name="periodic-safety-backups" value="1"/>
|
||||
<Option name="periodic-safety-backup-interval" value="120"/>
|
||||
<Option name="ui-rc-file" value="ardour2_ui_dark.rc"/>
|
||||
</Config>
|
||||
<Canvas>
|
||||
<Option name="waveform" value="000000cc"/>
|
||||
<Option name="clipped waveform" value="ff0000e5"/>
|
||||
<Option name="region base" value="bfbfc1aa"/>
|
||||
<Option name="selected region base" value="b591a8ff"/>
|
||||
<Option name="audio track base" value="c6d3d868"/>
|
||||
<Option name="audio bus base" value="dbd1ea68"/>
|
||||
<Option name="midi track base" value="ff8f8f3d"/>
|
||||
<Option name="midi bus base" value="ff0000ee"/>
|
||||
<Option name="time-stretch-fill" value="e2b5b596"/>
|
||||
<Option name="time-stretch-outline" value="63636396"/>
|
||||
<Option name="automation line" value="44bc59ff"/>
|
||||
<Option name="processor automation line" value="7aa3f9ff"/>
|
||||
<Option name="control point fill" value="000000ff"/>
|
||||
<Option name="control point outline" value="000000ff"/>
|
||||
<Option name="entered control point outline" value="ff0000ee"/>
|
||||
<Option name="entered control point selected" value="ff3535ff"/>
|
||||
<Option name="entered control point" value="000000cc"/>
|
||||
<Option name="control point selected" value="00ff00ff"/>
|
||||
<Option name="control point" value="ff0000ff"/>
|
||||
<Option name="automation track fill" value="a0a0ce68"/>
|
||||
<Option name="automation track outline" value="282828ff"/>
|
||||
<Option name="crossfade editor base" value="282d49ff"/>
|
||||
<Option name="crossfade editor line" value="000000ff"/>
|
||||
<Option name="selected crossfade editor line" value="00dbdbff"/>
|
||||
<Option name="crossfade editor line shading" value="00a0d154"/>
|
||||
<Option name="crossfade editor point fill" value="00ff00ff"/>
|
||||
<Option name="crossfade editor point outline" value="0000ffff"/>
|
||||
<Option name="crossfade editor wave" value="ffffff28"/>
|
||||
<Option name="selected crossfade editor wave" value="f9ea14a0"/>
|
||||
<Option name="crossfade line" value="000000ff"/>
|
||||
<Option name="active crossfade" value="e8ed3d77"/>
|
||||
<Option name="inactive crossfade" value="e8ed3d77"/>
|
||||
<Option name="location marker" value="c4f411ff"/>
|
||||
<Option name="location range" value="497a59ff"/>
|
||||
<Option name="location cd marker" value="1ee8c4ff"/>
|
||||
<Option name="location loop" value="35964fff"/>
|
||||
<Option name="location punch" value="7c3a3aff"/>
|
||||
<Option name="verbose canvas cursor" value="f4f214bc"/>
|
||||
<Option name="marker label" value="000000ff"/>
|
||||
<Option name="marker bar separator" value="30303088"/>
|
||||
<Option name="tempo bar" value="72727fff"/>
|
||||
<Option name="meterbar" value="666672ff"/>
|
||||
<Option name="markerbar" value="7f7f8cff"/>
|
||||
<Option name="rangemarker bar" value="8c8c96ff"/>
|
||||
<Option name="TransportMarkerBar" value="9898a3ff"/>
|
||||
<Option name="RangeDragBarRect" value="969696c6"/>
|
||||
<Option name="RangeDragRect" value="82c696c6"/>
|
||||
<Option name="TransportDragRect" value="969696c6"/>
|
||||
<Option name="MarkerDragLine" value="004f00f9"/>
|
||||
<Option name="TransportLoopRect" value="1e7728f9"/>
|
||||
<Option name="TransportPunchRect" value="6d2828e5"/>
|
||||
<Option name="PunchLine" value="a80000ff"/>
|
||||
<Option name="ZoomRect" value="c6d1b26d"/>
|
||||
<Option name="RubberBandRect" value="c6c6c659"/>
|
||||
<Option name="EnteredGainLine" value="dd6363ff"/>
|
||||
<Option name="EnteredAutomationLine" value="dd6363ff"/>
|
||||
<Option name="EnteredMarker" value="dd6363ff"/>
|
||||
<Option name="MeterMarker" value="f2425bff"/>
|
||||
<Option name="TempoMarker" value="f2425bff"/>
|
||||
<Option name="MeasureLineBeat" value="72727266"/>
|
||||
<Option name="MeasureLineBar" value="8c8c988c"/>
|
||||
<Option name="GhostTrackBase" value="44007c7f"/>
|
||||
<Option name="GhostTrackWave" value="02fd004c"/>
|
||||
<Option name="GhostTrackWaveClip" value="ff000000"/>
|
||||
<Option name="GhostTrackZeroLine" value="e500e566"/>
|
||||
<Option name="ImageTrack" value="ddddd8ff"/>
|
||||
<Option name="MarkerTrack" value="ddddd8ff"/>
|
||||
<Option name="ZeroLine" value="b5b5b5ff"/>
|
||||
<Option name="GainLine" value="ff00ff00"/>
|
||||
<Option name="GainLineInactive" value="f0f0ffff"/>
|
||||
<Option name="RecordingRect" value="e5c6c6ff"/>
|
||||
<Option name="SelectionRect" value="e8f4d377"/>
|
||||
<Option name="Selection" value="636363b2"/>
|
||||
<Option name="VestigialFrame" value="44007c0f"/>
|
||||
<Option name="TimeAxisFrame" value="44007c0f"/>
|
||||
<Option name="NameHighlightFill" value="0000ffff"/>
|
||||
<Option name="NameHighlightOutline" value="7c00ff96"/>
|
||||
<Option name="FrameHandle" value="7c00ff96"/>
|
||||
<Option name="TrimHandleLocked" value="ea0f0f28"/>
|
||||
<Option name="TrimHandle" value="1900ff44"/>
|
||||
<Option name="EditCursor" value="0000ffff"/>
|
||||
<Option name="PlayHead" value="ff0000ff"/>
|
||||
</Canvas>
|
||||
<extra>
|
||||
<Keyboard edit-button="3" edit-modifier="4" delete-button="3" delete-modifier="1" snap-modifier="32"/>
|
||||
</extra>
|
||||
|
|
|
@ -194,6 +194,7 @@ time_axis_view.cc
|
|||
time_axis_view_item.cc
|
||||
route_time_axis.cc
|
||||
time_selection.cc
|
||||
ui_config.cc
|
||||
utils.cc
|
||||
version.cc
|
||||
waveview.cc
|
||||
|
@ -334,7 +335,7 @@ env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour
|
|||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui_light.rc'))
|
||||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.menus'))
|
||||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.bindings'))
|
||||
#env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.colors'))
|
||||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui_default.conf'))
|
||||
# data files
|
||||
env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2'), 'splash.png'))
|
||||
env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2', 'pixmaps'), pixmap_files))
|
||||
|
@ -350,7 +351,7 @@ env.Alias ('tarball', env.Distribute (env['DISTTREE'],
|
|||
'ardev_common.sh.in',
|
||||
'ardev', 'ardbg',
|
||||
'ardour2_ui_dark.rc', 'ardour2_ui_light.rc', 'splash.png',
|
||||
'ardour.menus', 'ardour.bindings.in',# 'ardour.colors',
|
||||
'ardour.menus', 'ardour.bindings.in', 'ardour2_ui_default.conf',
|
||||
'editor_xpms'
|
||||
] +
|
||||
gtkardour_files +
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Ardour>
|
||||
<Canvas>
|
||||
<Option name="waveform" value="000000cc"/>
|
||||
<Option name="clipped waveform" value="ff0000e5"/>
|
||||
<Option name="region base" value="bfbfc1aa"/>
|
||||
<Option name="selected region base" value="b591a8ff"/>
|
||||
<Option name="audio track base" value="c6d3d868"/>
|
||||
<Option name="audio bus base" value="dbd1ea68"/>
|
||||
<Option name="midi track base" value="ff8f8f3d"/>
|
||||
<Option name="midi bus base" value="ff0000ee"/>
|
||||
<Option name="time-stretch-fill" value="e2b5b596"/>
|
||||
<Option name="time-stretch-outline" value="63636396"/>
|
||||
<Option name="automation line" value="44bc59ff"/>
|
||||
<Option name="processor automation line" value="7aa3f9ff"/>
|
||||
<Option name="control point fill" value="000000ff"/>
|
||||
<Option name="control point outline" value="000000ff"/>
|
||||
<Option name="entered control point outline" value="ff0000ee"/>
|
||||
<Option name="entered control point selected" value="ff3535ff"/>
|
||||
<Option name="entered control point" value="000000cc"/>
|
||||
<Option name="control point selected" value="00ff00ff"/>
|
||||
<Option name="control point" value="ff0000ff"/>
|
||||
<Option name="automation track fill" value="a0a0ce68"/>
|
||||
<Option name="automation track outline" value="282828ff"/>
|
||||
<Option name="crossfade editor base" value="282d49ff"/>
|
||||
<Option name="crossfade editor line" value="000000ff"/>
|
||||
<Option name="selected crossfade editor line" value="00dbdbff"/>
|
||||
<Option name="crossfade editor line shading" value="00a0d154"/>
|
||||
<Option name="crossfade editor point fill" value="00ff00ff"/>
|
||||
<Option name="crossfade editor point outline" value="0000ffff"/>
|
||||
<Option name="crossfade editor wave" value="ffffff28"/>
|
||||
<Option name="selected crossfade editor wave" value="f9ea14a0"/>
|
||||
<Option name="crossfade line" value="000000ff"/>
|
||||
<Option name="active crossfade" value="e8ed3d77"/>
|
||||
<Option name="inactive crossfade" value="e8ed3d77"/>
|
||||
<Option name="location marker" value="c4f411ff"/>
|
||||
<Option name="location range" value="497a59ff"/>
|
||||
<Option name="location cd marker" value="1ee8c4ff"/>
|
||||
<Option name="location loop" value="35964fff"/>
|
||||
<Option name="location punch" value="7c3a3aff"/>
|
||||
<Option name="verbose canvas cursor" value="f4f214bc"/>
|
||||
<Option name="marker label" value="000000ff"/>
|
||||
<Option name="marker bar separator" value="30303088"/>
|
||||
<Option name="tempo bar" value="72727fff"/>
|
||||
<Option name="meterbar" value="666672ff"/>
|
||||
<Option name="markerbar" value="7f7f8cff"/>
|
||||
<Option name="rangemarker bar" value="8c8c96ff"/>
|
||||
<Option name="TransportMarkerBar" value="9898a3ff"/>
|
||||
<Option name="RangeDragBarRect" value="969696c6"/>
|
||||
<Option name="RangeDragRect" value="82c696c6"/>
|
||||
<Option name="TransportDragRect" value="969696c6"/>
|
||||
<Option name="MarkerDragLine" value="004f00f9"/>
|
||||
<Option name="TransportLoopRect" value="1e7728f9"/>
|
||||
<Option name="TransportPunchRect" value="6d2828e5"/>
|
||||
<Option name="PunchLine" value="a80000ff"/>
|
||||
<Option name="ZoomRect" value="c6d1b26d"/>
|
||||
<Option name="RubberBandRect" value="c6c6c659"/>
|
||||
<Option name="EnteredGainLine" value="dd6363ff"/>
|
||||
<Option name="EnteredAutomationLine" value="dd6363ff"/>
|
||||
<Option name="EnteredMarker" value="dd6363ff"/>
|
||||
<Option name="MeterMarker" value="f2425bff"/>
|
||||
<Option name="TempoMarker" value="f2425bff"/>
|
||||
<Option name="MeasureLineBeat" value="72727266"/>
|
||||
<Option name="MeasureLineBar" value="8c8c988c"/>
|
||||
<Option name="GhostTrackBase" value="44007c7f"/>
|
||||
<Option name="GhostTrackWave" value="02fd004c"/>
|
||||
<Option name="GhostTrackWaveClip" value="ff000000"/>
|
||||
<Option name="GhostTrackZeroLine" value="e500e566"/>
|
||||
<Option name="ImageTrack" value="ddddd8ff"/>
|
||||
<Option name="MarkerTrack" value="ddddd8ff"/>
|
||||
<Option name="ZeroLine" value="b5b5b5ff"/>
|
||||
<Option name="GainLine" value="ff00ff00"/>
|
||||
<Option name="GainLineInactive" value="f0f0ffff"/>
|
||||
<Option name="RecordingRect" value="e5c6c6ff"/>
|
||||
<Option name="SelectionRect" value="e8f4d377"/>
|
||||
<Option name="Selection" value="636363b2"/>
|
||||
<Option name="VestigialFrame" value="44007c0f"/>
|
||||
<Option name="TimeAxisFrame" value="44007c0f"/>
|
||||
<Option name="NameHighlightFill" value="0000ffff"/>
|
||||
<Option name="NameHighlightOutline" value="7c00ff96"/>
|
||||
<Option name="FrameHandle" value="7c00ff96"/>
|
||||
<Option name="TrimHandleLocked" value="ea0f0f28"/>
|
||||
<Option name="TrimHandle" value="1900ff44"/>
|
||||
<Option name="EditCursor" value="0000ffff"/>
|
||||
<Option name="PlayHead" value="ff0000ff"/>
|
||||
</Canvas>
|
||||
</Ardour>
|
||||
|
|
@ -85,6 +85,7 @@
|
|||
#include "gui_thread.h"
|
||||
#include "theme_manager.h"
|
||||
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
|
@ -94,6 +95,7 @@ using namespace Gtk;
|
|||
using namespace sigc;
|
||||
|
||||
ARDOUR_UI *ARDOUR_UI::theArdourUI = 0;
|
||||
UIConfiguration *ARDOUR_UI::ui_config = 0;
|
||||
|
||||
sigc::signal<void,bool> ARDOUR_UI::Blink;
|
||||
sigc::signal<void> ARDOUR_UI::RapidScreenUpdate;
|
||||
|
@ -166,14 +168,9 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
|
|||
theArdourUI = this;
|
||||
}
|
||||
|
||||
/* load colors */
|
||||
|
||||
ui_config = new UIConfiguration();
|
||||
theme_manager = new ThemeManager();
|
||||
|
||||
//std::string color_file = ARDOUR::find_config_file("ardour.colors");
|
||||
|
||||
//theme_manager->load (color_file);
|
||||
|
||||
|
||||
editor = 0;
|
||||
mixer = 0;
|
||||
session = 0;
|
||||
|
@ -575,6 +572,7 @@ If you still wish to quit, please use the\n\n\
|
|||
}
|
||||
engine->stop (true);
|
||||
Config->save_state();
|
||||
ARDOUR_UI::config()->save_state();
|
||||
quit ();
|
||||
}
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
#include "audio_clock.h"
|
||||
#include "ardour_dialog.h"
|
||||
#include "editing.h"
|
||||
#include "ui_config.h"
|
||||
|
||||
class AudioClock;
|
||||
class PublicEditor;
|
||||
|
@ -94,6 +95,8 @@ namespace ALSA {
|
|||
|
||||
#define FRAME_NAME "BaseFrame"
|
||||
|
||||
extern sigc::signal<void> ColorsChanged;
|
||||
|
||||
class ARDOUR_UI : public Gtkmm2ext::UI
|
||||
{
|
||||
public:
|
||||
|
@ -136,6 +139,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
static ARDOUR::gain_t slider_position_to_gain (double pos);
|
||||
|
||||
static ARDOUR_UI *instance () { return theArdourUI; }
|
||||
static UIConfiguration *config () { return ui_config; }
|
||||
|
||||
PublicEditor& the_editor(){return *editor;}
|
||||
Mixer_UI* the_mixer() { return mixer; }
|
||||
|
@ -597,7 +601,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
int create_location_ui ();
|
||||
void handle_locations_change (ARDOUR::Location*);
|
||||
|
||||
ThemeManager* theme_manager;
|
||||
static UIConfiguration *ui_config;
|
||||
ThemeManager *theme_manager;
|
||||
|
||||
/* Options window */
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include "utils.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "gui_thread.h"
|
||||
#include "ardour_ui.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
@ -392,9 +393,9 @@ AudioRegionView::region_muted ()
|
|||
|
||||
for (uint32_t n=0; n < waves.size(); ++n) {
|
||||
if (_region->muted()) {
|
||||
waves[n]->property_wave_color() = UINT_RGBA_CHANGE_A(Config->canvasvar_WaveForm.get(), MUTED_ALPHA);
|
||||
waves[n]->property_wave_color() = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->canvasvar_WaveForm.get(), MUTED_ALPHA);
|
||||
} else {
|
||||
waves[n]->property_wave_color() = Config->canvasvar_WaveForm.get();
|
||||
waves[n]->property_wave_color() = ARDOUR_UI::config()->canvasvar_WaveForm.get();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -701,18 +702,18 @@ AudioRegionView::set_colors ()
|
|||
RegionView::set_colors();
|
||||
|
||||
if (gain_line) {
|
||||
gain_line->set_line_color (audio_region()->envelope_active() ? Config->canvasvar_GainLine.get() : Config->canvasvar_GainLineInactive.get());
|
||||
gain_line->set_line_color (audio_region()->envelope_active() ? ARDOUR_UI::config()->canvasvar_GainLine.get() : ARDOUR_UI::config()->canvasvar_GainLineInactive.get());
|
||||
}
|
||||
|
||||
for (uint32_t n=0; n < waves.size(); ++n) {
|
||||
if (_region->muted()) {
|
||||
waves[n]->property_wave_color() = UINT_RGBA_CHANGE_A(Config->canvasvar_WaveForm.get(), MUTED_ALPHA);
|
||||
waves[n]->property_wave_color() = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->canvasvar_WaveForm.get(), MUTED_ALPHA);
|
||||
} else {
|
||||
waves[n]->property_wave_color() = Config->canvasvar_WaveForm.get();
|
||||
waves[n]->property_wave_color() = ARDOUR_UI::config()->canvasvar_WaveForm.get();
|
||||
}
|
||||
|
||||
waves[n]->property_clip_color() = Config->canvasvar_WaveFormClip.get();
|
||||
waves[n]->property_zero_color() = Config->canvasvar_ZeroLine.get();
|
||||
waves[n]->property_clip_color() = ARDOUR_UI::config()->canvasvar_WaveFormClip.get();
|
||||
waves[n]->property_zero_color() = ARDOUR_UI::config()->canvasvar_ZeroLine.get();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -850,9 +851,9 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct)
|
|||
wave->property_height() = (double) ht;
|
||||
wave->property_samples_per_unit() = samples_per_unit;
|
||||
wave->property_amplitude_above_axis() = _amplitude_above_axis;
|
||||
wave->property_wave_color() = _region->muted() ? UINT_RGBA_CHANGE_A(Config->canvasvar_WaveForm.get(), MUTED_ALPHA) : Config->canvasvar_WaveForm.get();
|
||||
wave->property_clip_color() = Config->canvasvar_WaveFormClip.get();
|
||||
wave->property_zero_color() = Config->canvasvar_ZeroLine.get();
|
||||
wave->property_wave_color() = _region->muted() ? UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->canvasvar_WaveForm.get(), MUTED_ALPHA) : ARDOUR_UI::config()->canvasvar_WaveForm.get();
|
||||
wave->property_clip_color() = ARDOUR_UI::config()->canvasvar_WaveFormClip.get();
|
||||
wave->property_zero_color() = ARDOUR_UI::config()->canvasvar_ZeroLine.get();
|
||||
wave->property_region_start() = _region->start();
|
||||
wave->property_rectified() = (bool) (_flags & WaveformRectified);
|
||||
wave->property_logscaled() = (bool) (_flags & WaveformLogScaled);
|
||||
|
@ -896,7 +897,7 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct)
|
|||
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) Config->canvasvar_ZeroLine.get();
|
||||
zero_line->property_color_rgba() = (guint) ARDOUR_UI::config()->canvasvar_ZeroLine.get();
|
||||
manage_zero_line ();
|
||||
}
|
||||
}
|
||||
|
@ -1098,9 +1099,9 @@ AudioRegionView::add_ghost (AutomationTimeAxisView& atv)
|
|||
wave->property_x() = 0.0;
|
||||
wave->property_samples_per_unit() = samples_per_unit;
|
||||
wave->property_amplitude_above_axis() = _amplitude_above_axis;
|
||||
wave->property_wave_color() = Config->canvasvar_GhostTrackWave.get();
|
||||
wave->property_clip_color() = Config->canvasvar_GhostTrackWaveClip.get();
|
||||
wave->property_zero_color() = Config->canvasvar_GhostTrackZeroLine.get();
|
||||
wave->property_wave_color() = ARDOUR_UI::config()->canvasvar_GhostTrackWave.get();
|
||||
wave->property_clip_color() = ARDOUR_UI::config()->canvasvar_GhostTrackWaveClip.get();
|
||||
wave->property_zero_color() = ARDOUR_UI::config()->canvasvar_GhostTrackZeroLine.get();
|
||||
wave->property_region_start() = _region->start();
|
||||
|
||||
ghost->waves.push_back(wave);
|
||||
|
@ -1153,7 +1154,7 @@ void
|
|||
AudioRegionView::envelope_active_changed ()
|
||||
{
|
||||
if (gain_line) {
|
||||
gain_line->set_line_color (audio_region()->envelope_active() ? Config->canvasvar_GainLine.get() : Config->canvasvar_GainLineInactive.get());
|
||||
gain_line->set_line_color (audio_region()->envelope_active() ? ARDOUR_UI::config()->canvasvar_GainLine.get() : ARDOUR_UI::config()->canvasvar_GainLineInactive.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -64,9 +64,9 @@ AudioStreamView::AudioStreamView (AudioTimeAxisView& tv)
|
|||
_waveform_shape = Traditional;
|
||||
|
||||
if (tv.is_track())
|
||||
stream_base_color = Config->canvasvar_AudioTrackBase.get();
|
||||
stream_base_color = ARDOUR_UI::config()->canvasvar_AudioTrackBase.get();
|
||||
else
|
||||
stream_base_color = Config->canvasvar_AudioBusBase.get();
|
||||
stream_base_color = ARDOUR_UI::config()->canvasvar_AudioBusBase.get();
|
||||
|
||||
canvas_rect->property_fill_color_rgba() = stream_base_color;
|
||||
canvas_rect->property_outline_color_rgba() = RGBA_BLACK;
|
||||
|
@ -520,12 +520,12 @@ AudioStreamView::setup_rec_box ()
|
|||
switch (_trackview.audio_track()->mode()) {
|
||||
case Normal:
|
||||
xend = xstart;
|
||||
fill_color = Config->canvasvar_RecordingRect.get();
|
||||
fill_color = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
|
||||
break;
|
||||
|
||||
case Destructive:
|
||||
xend = xstart + 2;
|
||||
fill_color = Config->canvasvar_RecordingRect.get();
|
||||
fill_color = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
|
||||
/* make the recording rect translucent to allow
|
||||
the user to see the peak data coming in, etc.
|
||||
*/
|
||||
|
@ -538,7 +538,7 @@ AudioStreamView::setup_rec_box ()
|
|||
rec_rect->property_y1() = 1.0;
|
||||
rec_rect->property_x2() = xend;
|
||||
rec_rect->property_y2() = (double) _trackview.height - 1;
|
||||
rec_rect->property_outline_color_rgba() = Config->canvasvar_RecordingRect.get();
|
||||
rec_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
|
||||
rec_rect->property_fill_color_rgba() = fill_color;
|
||||
rec_rect->lower_to_bottom();
|
||||
|
||||
|
@ -765,12 +765,12 @@ AudioStreamView::color_handler ()
|
|||
{
|
||||
//case cAudioTrackBase:
|
||||
if (_trackview.is_track()) {
|
||||
canvas_rect->property_fill_color_rgba() = Config->canvasvar_AudioTrackBase.get();
|
||||
canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_AudioTrackBase.get();
|
||||
}
|
||||
|
||||
//case cAudioBusBase:
|
||||
if (!_trackview.is_track()) {
|
||||
canvas_rect->property_fill_color_rgba() = Config->canvasvar_AudioBusBase.get();
|
||||
canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_AudioBusBase.get();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -304,7 +304,7 @@ AudioTimeAxisView::create_automation_child (ParamID param)
|
|||
*gain_track->canvas_display,
|
||||
c->list());
|
||||
|
||||
line->set_line_color (Config->canvasvar_AutomationLine.get());
|
||||
line->set_line_color (ARDOUR_UI::config()->canvasvar_AutomationLine.get());
|
||||
|
||||
gain_track->add_line (*line);
|
||||
|
||||
|
@ -362,10 +362,10 @@ AudioTimeAxisView::update_pans ()
|
|||
|
||||
if (p == _route->panner().begin()) {
|
||||
/* first line is a nice orange */
|
||||
line->set_line_color (Config->canvasvar_AutomationLine.get());
|
||||
line->set_line_color (ARDOUR_UI::config()->canvasvar_AutomationLine.get());
|
||||
} else {
|
||||
/* second line is a nice blue */
|
||||
line->set_line_color (Config->canvasvar_AutomationLine.get());
|
||||
line->set_line_color (ARDOUR_UI::config()->canvasvar_AutomationLine.get());
|
||||
}
|
||||
|
||||
pan_track->add_line (*line);
|
||||
|
|
|
@ -69,8 +69,8 @@ ControlPoint::ControlPoint (AutomationLine& al)
|
|||
item = new Canvas::SimpleRect (line.canvas_group());
|
||||
item->property_draw() = true;
|
||||
item->property_fill() = false;
|
||||
item->property_fill_color_rgba() = Config->canvasvar_ControlPointFill.get();
|
||||
item->property_outline_color_rgba() = Config->canvasvar_ControlPointOutline.get();
|
||||
item->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_ControlPointFill.get();
|
||||
item->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_ControlPointOutline.get();
|
||||
item->property_outline_pixels() = 1;
|
||||
item->set_data ("control_point", this);
|
||||
item->signal_event().connect (mem_fun (this, &ControlPoint::event_handler));
|
||||
|
@ -97,7 +97,7 @@ ControlPoint::ControlPoint (const ControlPoint& other, bool dummy_arg_to_force_s
|
|||
|
||||
item = new Canvas::SimpleRect (line.canvas_group());
|
||||
item->property_fill() = false;
|
||||
item->property_outline_color_rgba() = Config->canvasvar_EnteredControlPointOutline.get();
|
||||
item->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_EnteredControlPointOutline.get();
|
||||
item->property_outline_pixels() = 1;
|
||||
|
||||
/* NOTE: no event handling in copied ControlPoints */
|
||||
|
@ -148,10 +148,10 @@ ControlPoint::show_color (bool entered, bool hide_too)
|
|||
{
|
||||
if (entered) {
|
||||
if (selected) {
|
||||
item->property_outline_color_rgba() = Config->canvasvar_EnteredControlPointSelected.get();
|
||||
item->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_EnteredControlPointSelected.get();
|
||||
set_visible(true);
|
||||
} else {
|
||||
item->property_outline_color_rgba() = Config->canvasvar_EnteredControlPoint.get();
|
||||
item->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_EnteredControlPoint.get();
|
||||
if (hide_too) {
|
||||
set_visible(false);
|
||||
}
|
||||
|
@ -159,10 +159,10 @@ ControlPoint::show_color (bool entered, bool hide_too)
|
|||
|
||||
} else {
|
||||
if (selected) {
|
||||
item->property_outline_color_rgba() = Config->canvasvar_ControlPointSelected.get();
|
||||
item->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_ControlPointSelected.get();
|
||||
set_visible(true);
|
||||
} else {
|
||||
item->property_outline_color_rgba() = Config->canvasvar_ControlPoint.get();
|
||||
item->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_ControlPoint.get();
|
||||
if (hide_too) {
|
||||
set_visible(false);
|
||||
}
|
||||
|
@ -1148,7 +1148,7 @@ AutomationLine::set_selected_points (PointSelection& points)
|
|||
}
|
||||
|
||||
void AutomationLine::set_colors() {
|
||||
set_line_color( Config->canvasvar_AutomationLine.get() );
|
||||
set_line_color( ARDOUR_UI::config()->canvasvar_AutomationLine.get() );
|
||||
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
|
||||
(*i)->show_color (false, !points_visible);
|
||||
}
|
||||
|
|
|
@ -78,11 +78,11 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
|
|||
base_rect->property_x1() = 0.0;
|
||||
base_rect->property_y1() = 0.0;
|
||||
base_rect->property_x2() = editor.frame_to_pixel (max_frames);
|
||||
base_rect->property_outline_color_rgba() = Config->canvasvar_AutomationTrackOutline.get();
|
||||
base_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_AutomationTrackOutline.get();
|
||||
/* outline ends and bottom */
|
||||
base_rect->property_outline_what() = (guint32) (0x1|0x2|0x8);
|
||||
base_rect->property_fill_color_rgba() = Config->canvasvar_AutomationTrackFill.get();
|
||||
//base_rect->property_fill_color_rgba() = Config->canvasvar_EnteredControlPoint.get();
|
||||
base_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_AutomationTrackFill.get();
|
||||
//base_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_EnteredControlPoint.get();
|
||||
|
||||
base_rect->set_data ("trackview", this);
|
||||
|
||||
|
|
|
@ -129,23 +129,23 @@ CrossfadeEditor::CrossfadeEditor (Session& s, boost::shared_ptr<Crossfade> xf, d
|
|||
toplevel->property_x2() = 10.0;
|
||||
toplevel->property_y2() = 10.0;
|
||||
toplevel->property_fill() = true;
|
||||
toplevel->property_fill_color_rgba() = Config->canvasvar_CrossfadeEditorBase.get();
|
||||
toplevel->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorBase.get();
|
||||
toplevel->property_outline_pixels() = 0;
|
||||
toplevel->signal_event().connect (mem_fun (*this, &CrossfadeEditor::canvas_event));
|
||||
|
||||
fade[Out].line = new ArdourCanvas::Line (*(canvas->root()));
|
||||
fade[Out].line->property_width_pixels() = 1;
|
||||
fade[Out].line->property_fill_color_rgba() = Config->canvasvar_CrossfadeEditorLine.get();
|
||||
fade[Out].line->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorLine.get();
|
||||
|
||||
fade[Out].shading = new ArdourCanvas::Polygon (*(canvas->root()));
|
||||
fade[Out].shading->property_fill_color_rgba() = Config->canvasvar_CrossfadeEditorLineShading.get();
|
||||
fade[Out].shading->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorLineShading.get();
|
||||
|
||||
fade[In].line = new ArdourCanvas::Line (*(canvas->root()));
|
||||
fade[In].line->property_width_pixels() = 1;
|
||||
fade[In].line->property_fill_color_rgba() = Config->canvasvar_CrossfadeEditorLine.get();
|
||||
fade[In].line->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorLine.get();
|
||||
|
||||
fade[In].shading = new ArdourCanvas::Polygon (*(canvas->root()));
|
||||
fade[In].shading->property_fill_color_rgba() = Config->canvasvar_CrossfadeEditorLineShading.get();
|
||||
fade[In].shading->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorLineShading.get();
|
||||
|
||||
fade[In].shading->signal_event().connect (mem_fun (*this, &CrossfadeEditor::canvas_event));
|
||||
fade[In].line->signal_event().connect (mem_fun (*this, &CrossfadeEditor::curve_event));
|
||||
|
@ -454,8 +454,8 @@ CrossfadeEditor::make_point ()
|
|||
|
||||
p->box = new ArdourCanvas::SimpleRect (*(canvas->root()));
|
||||
p->box->property_fill() = true;
|
||||
p->box->property_fill_color_rgba() = Config->canvasvar_CrossfadeEditorPointFill.get();
|
||||
p->box->property_outline_color_rgba() = Config->canvasvar_CrossfadeEditorPointOutline.get();
|
||||
p->box->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorPointFill.get();
|
||||
p->box->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorPointOutline.get();
|
||||
p->box->property_outline_pixels() = 1;
|
||||
|
||||
p->curve = fade[current].line;
|
||||
|
@ -976,15 +976,15 @@ CrossfadeEditor::curve_select_clicked (WhichFade wf)
|
|||
if (wf == In) {
|
||||
|
||||
for (vector<ArdourCanvas::WaveView*>::iterator i = fade[In].waves.begin(); i != fade[In].waves.end(); ++i) {
|
||||
(*i)->property_wave_color() = Config->canvasvar_SelectedCrossfadeEditorWave.get();
|
||||
(*i)->property_wave_color() = ARDOUR_UI::config()->canvasvar_SelectedCrossfadeEditorWave.get();
|
||||
}
|
||||
|
||||
for (vector<ArdourCanvas::WaveView*>::iterator i = fade[Out].waves.begin(); i != fade[Out].waves.end(); ++i) {
|
||||
(*i)->property_wave_color() = Config->canvasvar_CrossfadeEditorWave.get();
|
||||
(*i)->property_wave_color() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorWave.get();
|
||||
}
|
||||
|
||||
fade[In].line->property_fill_color_rgba() = Config->canvasvar_SelectedCrossfadeEditorLine.get();
|
||||
fade[Out].line->property_fill_color_rgba() = Config->canvasvar_CrossfadeEditorLine.get();
|
||||
fade[In].line->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_SelectedCrossfadeEditorLine.get();
|
||||
fade[Out].line->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorLine.get();
|
||||
fade[Out].shading->hide();
|
||||
fade[In].shading->show();
|
||||
|
||||
|
@ -999,15 +999,15 @@ CrossfadeEditor::curve_select_clicked (WhichFade wf)
|
|||
} else {
|
||||
|
||||
for (vector<ArdourCanvas::WaveView*>::iterator i = fade[In].waves.begin(); i != fade[In].waves.end(); ++i) {
|
||||
(*i)->property_wave_color() = Config->canvasvar_CrossfadeEditorWave.get();
|
||||
(*i)->property_wave_color() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorWave.get();
|
||||
}
|
||||
|
||||
for (vector<ArdourCanvas::WaveView*>::iterator i = fade[Out].waves.begin(); i != fade[Out].waves.end(); ++i) {
|
||||
(*i)->property_wave_color() = Config->canvasvar_SelectedCrossfadeEditorWave.get();
|
||||
(*i)->property_wave_color() = ARDOUR_UI::config()->canvasvar_SelectedCrossfadeEditorWave.get();
|
||||
}
|
||||
|
||||
fade[Out].line->property_fill_color_rgba() = Config->canvasvar_SelectedCrossfadeEditorLine.get();
|
||||
fade[In].line->property_fill_color_rgba() = Config->canvasvar_CrossfadeEditorLine.get();
|
||||
fade[Out].line->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_SelectedCrossfadeEditorLine.get();
|
||||
fade[In].line->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorLine.get();
|
||||
fade[In].shading->hide();
|
||||
fade[Out].shading->show();
|
||||
|
||||
|
@ -1049,9 +1049,9 @@ CrossfadeEditor::make_waves (boost::shared_ptr<AudioRegion> region, WhichFade wh
|
|||
double spu;
|
||||
|
||||
if (which == In) {
|
||||
color = Config->canvasvar_SelectedCrossfadeEditorWave.get();
|
||||
color = ARDOUR_UI::config()->canvasvar_SelectedCrossfadeEditorWave.get();
|
||||
} else {
|
||||
color = Config->canvasvar_CrossfadeEditorWave.get();
|
||||
color = ARDOUR_UI::config()->canvasvar_CrossfadeEditorWave.get();
|
||||
}
|
||||
|
||||
ht = canvas->get_allocation().get_height() / (double) nchans;
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "audio_region_view.h"
|
||||
#include "utils.h"
|
||||
#include "canvas_impl.h"
|
||||
#include "ardour_ui.h"
|
||||
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
|
@ -61,11 +62,11 @@ CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent,
|
|||
_visible = true;
|
||||
|
||||
fade_in = new Line (*group);
|
||||
fade_in->property_fill_color_rgba() = Config->canvasvar_CrossfadeLine.get();
|
||||
fade_in->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeLine.get();
|
||||
fade_in->property_width_pixels() = 1;
|
||||
|
||||
fade_out = new Line (*group);
|
||||
fade_out->property_fill_color_rgba() = Config->canvasvar_CrossfadeLine.get();
|
||||
fade_out->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeLine.get();
|
||||
fade_out->property_width_pixels() = 1;
|
||||
|
||||
set_y_position_and_height (0, get_time_axis_view().height);
|
||||
|
@ -220,9 +221,9 @@ void
|
|||
CrossfadeView::active_changed ()
|
||||
{
|
||||
if (crossfade->active()) {
|
||||
frame->property_fill_color_rgba() = Config->canvasvar_ActiveCrossfade.get();
|
||||
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_ActiveCrossfade.get();
|
||||
} else {
|
||||
frame->property_fill_color_rgba() = Config->canvasvar_InactiveCrossfade.get();
|
||||
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_InactiveCrossfade.get();
|
||||
}
|
||||
|
||||
redraw_curves ();
|
||||
|
|
|
@ -312,11 +312,11 @@ Editor::Editor ()
|
|||
_dragging_playhead = false;
|
||||
_dragging_hscrollbar = false;
|
||||
|
||||
location_marker_color = Config->canvasvar_LocationMarker.get();
|
||||
location_range_color = Config->canvasvar_LocationRange.get();
|
||||
location_cd_marker_color = Config->canvasvar_LocationCDMarker.get();
|
||||
location_loop_color = Config->canvasvar_LocationLoop.get();
|
||||
location_punch_color = Config->canvasvar_LocationPunch.get();
|
||||
location_marker_color = ARDOUR_UI::config()->canvasvar_LocationMarker.get();
|
||||
location_range_color = ARDOUR_UI::config()->canvasvar_LocationRange.get();
|
||||
location_cd_marker_color = ARDOUR_UI::config()->canvasvar_LocationCDMarker.get();
|
||||
location_loop_color = ARDOUR_UI::config()->canvasvar_LocationLoop.get();
|
||||
location_punch_color = ARDOUR_UI::config()->canvasvar_LocationPunch.get();
|
||||
|
||||
range_marker_drag_rect = 0;
|
||||
marker_drag_line = 0;
|
||||
|
|
|
@ -700,56 +700,56 @@ Editor::canvas_horizontally_scrolled ()
|
|||
void
|
||||
Editor::color_handler()
|
||||
{
|
||||
edit_cursor->canvas_item.property_fill_color_rgba() = Config->canvasvar_EditCursor.get();
|
||||
playhead_cursor->canvas_item.property_fill_color_rgba() = Config->canvasvar_PlayHead.get();
|
||||
verbose_canvas_cursor->property_fill_color_rgba() = Config->canvasvar_VerboseCanvasCursor.get();
|
||||
edit_cursor->canvas_item.property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_EditCursor.get();
|
||||
playhead_cursor->canvas_item.property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_PlayHead.get();
|
||||
verbose_canvas_cursor->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_VerboseCanvasCursor.get();
|
||||
|
||||
meter_bar->property_fill_color_rgba() = Config->canvasvar_MeterBar.get();
|
||||
meter_bar->property_outline_color_rgba() = Config->canvasvar_MarkerBarSeparator.get();
|
||||
meter_bar->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MeterBar.get();
|
||||
meter_bar->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerBarSeparator.get();
|
||||
|
||||
tempo_bar->property_fill_color_rgba() = Config->canvasvar_TempoBar.get();
|
||||
tempo_bar->property_outline_color_rgba() = Config->canvasvar_MarkerBarSeparator.get();
|
||||
tempo_bar->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TempoBar.get();
|
||||
tempo_bar->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerBarSeparator.get();
|
||||
|
||||
marker_bar->property_fill_color_rgba() = Config->canvasvar_MarkerBar.get();
|
||||
marker_bar->property_outline_color_rgba() = Config->canvasvar_MarkerBarSeparator.get();
|
||||
marker_bar->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerBar.get();
|
||||
marker_bar->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerBarSeparator.get();
|
||||
|
||||
range_marker_bar->property_fill_color_rgba() = Config->canvasvar_RangeMarkerBar.get();
|
||||
range_marker_bar->property_outline_color_rgba() = Config->canvasvar_MarkerBarSeparator.get();
|
||||
range_marker_bar->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_RangeMarkerBar.get();
|
||||
range_marker_bar->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerBarSeparator.get();
|
||||
|
||||
transport_marker_bar->property_fill_color_rgba() = Config->canvasvar_TransportMarkerBar.get();
|
||||
transport_marker_bar->property_outline_color_rgba() = Config->canvasvar_MarkerBarSeparator.get();
|
||||
transport_marker_bar->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TransportMarkerBar.get();
|
||||
transport_marker_bar->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerBarSeparator.get();
|
||||
|
||||
range_bar_drag_rect->property_fill_color_rgba() = Config->canvasvar_RangeDragBarRect.get();
|
||||
range_bar_drag_rect->property_outline_color_rgba() = Config->canvasvar_RangeDragBarRect.get();
|
||||
range_bar_drag_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_RangeDragBarRect.get();
|
||||
range_bar_drag_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RangeDragBarRect.get();
|
||||
|
||||
transport_bar_drag_rect->property_fill_color_rgba() = Config->canvasvar_TransportDragRect.get();
|
||||
transport_bar_drag_rect->property_outline_color_rgba() = Config->canvasvar_TransportDragRect.get();
|
||||
transport_bar_drag_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TransportDragRect.get();
|
||||
transport_bar_drag_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TransportDragRect.get();
|
||||
|
||||
marker_drag_line->property_fill_color_rgba() = Config->canvasvar_MarkerDragLine.get();
|
||||
marker_drag_line->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerDragLine.get();
|
||||
|
||||
range_marker_drag_rect->property_fill_color_rgba() = Config->canvasvar_RangeDragRect.get();
|
||||
range_marker_drag_rect->property_outline_color_rgba() = Config->canvasvar_RangeDragRect.get();
|
||||
range_marker_drag_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_RangeDragRect.get();
|
||||
range_marker_drag_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RangeDragRect.get();
|
||||
|
||||
transport_loop_range_rect->property_fill_color_rgba() = Config->canvasvar_TransportLoopRect.get();
|
||||
transport_loop_range_rect->property_outline_color_rgba() = Config->canvasvar_TransportLoopRect.get();
|
||||
transport_loop_range_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TransportLoopRect.get();
|
||||
transport_loop_range_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TransportLoopRect.get();
|
||||
|
||||
transport_punch_range_rect->property_fill_color_rgba() = Config->canvasvar_TransportPunchRect.get();
|
||||
transport_punch_range_rect->property_outline_color_rgba() = Config->canvasvar_TransportPunchRect.get();
|
||||
transport_punch_range_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TransportPunchRect.get();
|
||||
transport_punch_range_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TransportPunchRect.get();
|
||||
|
||||
transport_punchin_line->property_color_rgba() = Config->canvasvar_PunchLine.get();
|
||||
transport_punchout_line->property_color_rgba() = Config->canvasvar_PunchLine.get();
|
||||
transport_punchin_line->property_color_rgba() = ARDOUR_UI::config()->canvasvar_PunchLine.get();
|
||||
transport_punchout_line->property_color_rgba() = ARDOUR_UI::config()->canvasvar_PunchLine.get();
|
||||
|
||||
zoom_rect->property_fill_color_rgba() = Config->canvasvar_ZoomRect.get();
|
||||
zoom_rect->property_outline_color_rgba() = Config->canvasvar_ZoomRect.get();
|
||||
zoom_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_ZoomRect.get();
|
||||
zoom_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_ZoomRect.get();
|
||||
|
||||
rubberband_rect->property_outline_color_rgba() = Config->canvasvar_RubberBandRect.get();
|
||||
rubberband_rect->property_fill_color_rgba() = (guint32) Config->canvasvar_RubberBandRect.get();
|
||||
rubberband_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RubberBandRect.get();
|
||||
rubberband_rect->property_fill_color_rgba() = (guint32) ARDOUR_UI::config()->canvasvar_RubberBandRect.get();
|
||||
|
||||
location_marker_color = Config->canvasvar_LocationMarker.get();
|
||||
location_range_color = Config->canvasvar_LocationRange.get();
|
||||
location_cd_marker_color = Config->canvasvar_LocationCDMarker.get();
|
||||
location_loop_color = Config->canvasvar_LocationLoop.get();
|
||||
location_punch_color = Config->canvasvar_LocationPunch.get();
|
||||
location_marker_color = ARDOUR_UI::config()->canvasvar_LocationMarker.get();
|
||||
location_range_color = ARDOUR_UI::config()->canvasvar_LocationRange.get();
|
||||
location_cd_marker_color = ARDOUR_UI::config()->canvasvar_LocationCDMarker.get();
|
||||
location_loop_color = ARDOUR_UI::config()->canvasvar_LocationLoop.get();
|
||||
location_punch_color = ARDOUR_UI::config()->canvasvar_LocationPunch.get();
|
||||
|
||||
refresh_location_display ();
|
||||
redisplay_tempo (true);
|
||||
|
|
|
@ -1097,7 +1097,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
if (mouse_mode == MouseGain) {
|
||||
ArdourCanvas::Line *line = dynamic_cast<ArdourCanvas::Line *> (item);
|
||||
if (line)
|
||||
line->property_fill_color_rgba() = Config->canvasvar_EnteredGainLine.get();
|
||||
line->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_EnteredGainLine.get();
|
||||
if (is_drawable()) {
|
||||
track_canvas.get_window()->set_cursor (*fader_cursor);
|
||||
}
|
||||
|
@ -1112,7 +1112,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
{
|
||||
ArdourCanvas::Line *line = dynamic_cast<ArdourCanvas::Line *> (item);
|
||||
if (line)
|
||||
line->property_fill_color_rgba() = Config->canvasvar_EnteredAutomationLine.get();
|
||||
line->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_EnteredAutomationLine.get();
|
||||
}
|
||||
if (is_drawable()) {
|
||||
track_canvas.get_window()->set_cursor (*fader_cursor);
|
||||
|
@ -1199,7 +1199,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
if ((marker = static_cast<Marker *> (item->get_data ("marker"))) == 0) {
|
||||
break;
|
||||
}
|
||||
marker->set_color_rgba (Config->canvasvar_EnteredMarker.get());
|
||||
marker->set_color_rgba (ARDOUR_UI::config()->canvasvar_EnteredMarker.get());
|
||||
// fall through
|
||||
case MeterMarkerItem:
|
||||
case TempoMarkerItem:
|
||||
|
@ -2196,7 +2196,7 @@ Editor::start_meter_marker_copy_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
// The actual copying is not done before we reach the finish callback.
|
||||
char name[64];
|
||||
snprintf (name, sizeof(name), "%g/%g", meter_marker->meter().beats_per_bar(), meter_marker->meter().note_divisor ());
|
||||
MeterMarker* new_marker = new MeterMarker(*this, *meter_group, Config->canvasvar_MeterMarker.get(), name,
|
||||
MeterMarker* new_marker = new MeterMarker(*this, *meter_group, ARDOUR_UI::config()->canvasvar_MeterMarker.get(), name,
|
||||
*new MeterSection(meter_marker->meter()));
|
||||
|
||||
drag_info.item = &new_marker->the_item();
|
||||
|
@ -2327,7 +2327,7 @@ Editor::start_tempo_marker_copy_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
// The actual copying is not done before we reach the finish callback.
|
||||
char name[64];
|
||||
snprintf (name, sizeof (name), "%.2f", tempo_marker->tempo().beats_per_minute());
|
||||
TempoMarker* new_marker = new TempoMarker(*this, *tempo_group, Config->canvasvar_TempoMarker.get(), name,
|
||||
TempoMarker* new_marker = new TempoMarker(*this, *tempo_group, ARDOUR_UI::config()->canvasvar_TempoMarker.get(), name,
|
||||
*new TempoSection(tempo_marker->tempo()));
|
||||
|
||||
drag_info.item = &new_marker->the_item();
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "gui_thread.h"
|
||||
#include "color.h"
|
||||
#include "time_axis_view.h"
|
||||
#include "ardour_ui.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
@ -80,11 +81,11 @@ Editor::draw_metric_marks (const Metrics& metrics)
|
|||
|
||||
if ((ms = dynamic_cast<const MeterSection*>(*i)) != 0) {
|
||||
snprintf (buf, sizeof(buf), "%g/%g", ms->beats_per_bar(), ms->note_divisor ());
|
||||
metric_marks.push_back (new MeterMarker (*this, *meter_group, Config->canvasvar_MeterMarker.get(), buf,
|
||||
metric_marks.push_back (new MeterMarker (*this, *meter_group, ARDOUR_UI::config()->canvasvar_MeterMarker.get(), buf,
|
||||
*(const_cast<MeterSection*>(ms))));
|
||||
} else if ((ts = dynamic_cast<const TempoSection*>(*i)) != 0) {
|
||||
snprintf (buf, sizeof (buf), "%.2f", ts->beats_per_minute());
|
||||
metric_marks.push_back (new TempoMarker (*this, *tempo_group, Config->canvasvar_TempoMarker.get(), buf,
|
||||
metric_marks.push_back (new TempoMarker (*this, *tempo_group, ARDOUR_UI::config()->canvasvar_TempoMarker.get(), buf,
|
||||
*(const_cast<TempoSection*>(ts))));
|
||||
}
|
||||
|
||||
|
@ -249,9 +250,9 @@ Editor::draw_measures ()
|
|||
case TempoMap::Beat:
|
||||
|
||||
if ((*i).beat == 1) {
|
||||
color = Config->canvasvar_MeasureLineBar.get();
|
||||
color = ARDOUR_UI::config()->canvasvar_MeasureLineBar.get();
|
||||
} else {
|
||||
color = Config->canvasvar_MeasureLineBeat.get();
|
||||
color = ARDOUR_UI::config()->canvasvar_MeasureLineBeat.get();
|
||||
|
||||
if (beat_density > 2.0) {
|
||||
/* only draw beat lines if the gaps between beats are large.
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "ghostregion.h"
|
||||
#include "automation_time_axis.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "ardour_ui.h"
|
||||
|
||||
using namespace Editing;
|
||||
using namespace ArdourCanvas;
|
||||
|
@ -44,8 +45,8 @@ GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos)
|
|||
base_rect->property_y1() = (double) 0.0;
|
||||
base_rect->property_y2() = (double) trackview.height;
|
||||
base_rect->property_outline_what() = (guint32) 0;
|
||||
base_rect->property_outline_color_rgba() = Config->canvasvar_GhostTrackBase.get();
|
||||
base_rect->property_fill_color_rgba() = Config->canvasvar_GhostTrackBase.get();
|
||||
base_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_GhostTrackBase.get();
|
||||
base_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_GhostTrackBase.get();
|
||||
group->lower_to_bottom ();
|
||||
|
||||
atv.add_ghost (this);
|
||||
|
@ -92,13 +93,13 @@ GhostRegion::set_height ()
|
|||
void
|
||||
GhostRegion::set_colors ()
|
||||
{
|
||||
base_rect->property_outline_color_rgba() = Config->canvasvar_GhostTrackBase.get();
|
||||
base_rect->property_fill_color_rgba() = Config->canvasvar_GhostTrackBase.get();
|
||||
base_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_GhostTrackBase.get();
|
||||
base_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_GhostTrackBase.get();
|
||||
|
||||
for (uint32_t n=0; n < waves.size(); ++n) {
|
||||
waves[n]->property_wave_color() = Config->canvasvar_GhostTrackWave.get();
|
||||
waves[n]->property_wave_color() = ARDOUR_UI::config()->canvasvar_GhostTrackWave.get();
|
||||
|
||||
waves[n]->property_clip_color() = Config->canvasvar_GhostTrackWaveClip.get();
|
||||
waves[n]->property_zero_color() = Config->canvasvar_GhostTrackZeroLine.get();
|
||||
waves[n]->property_clip_color() = ARDOUR_UI::config()->canvasvar_GhostTrackWaveClip.get();
|
||||
waves[n]->property_zero_color() = ARDOUR_UI::config()->canvasvar_GhostTrackZeroLine.get();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "public_editor.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "gui_thread.h"
|
||||
#include "ardour_ui.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
@ -52,9 +53,9 @@ ImageFrameTimeAxisView::ImageFrameTimeAxisView (ImageFrameTimeAxis& tv)
|
|||
canvas_rect (canvas_group, 0.0, 0.0, 1000000.0, tv.height)
|
||||
{
|
||||
region_color = _trackview.color() ;
|
||||
stream_base_color = Config->canvasvar_ImageTrack.get() ;
|
||||
stream_base_color = ARDOUR_UI::config()->canvasvar_ImageTrack.get() ;
|
||||
|
||||
canvas_rect.property_outline_color_rgba() = Config->canvasvar_ImageTrack.get();
|
||||
canvas_rect.property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_ImageTrack.get();
|
||||
canvas_rect.property_fill_color_rgba() = stream_base_color;
|
||||
|
||||
canvas_rect.signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_imageframe_view_event), (ArdourCanvas::Item*) &canvas_rect, &tv));
|
||||
|
|
|
@ -270,7 +270,6 @@ int main (int argc, char *argv[])
|
|||
return -1;
|
||||
}
|
||||
|
||||
ui->setup_theme ();
|
||||
ui->start_engine ();
|
||||
|
||||
if (maybe_load_session ()) {
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "utils.h"
|
||||
#include "canvas_impl.h"
|
||||
#include "color.h"
|
||||
#include "ardour_ui.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
@ -255,7 +256,7 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
|
|||
}
|
||||
text->property_y() = 0.0;
|
||||
text->property_anchor() = Gtk::ANCHOR_NW;
|
||||
text->property_fill_color_rgba() = Config->canvasvar_MarkerLabel.get();
|
||||
text->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerLabel.get();
|
||||
|
||||
editor.ZoomChanged.connect (mem_fun (*this, &Marker::reposition));
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "public_editor.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "gui_thread.h"
|
||||
#include "ardour_ui.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
@ -49,7 +50,7 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
|
|||
: _trackview (tv)
|
||||
{
|
||||
region_color = _trackview.color();
|
||||
stream_base_color = Config->canvasvar_MarkerTrack.get();
|
||||
stream_base_color = ARDOUR_UI::config()->canvasvar_MarkerTrack.get();
|
||||
|
||||
canvas_group = new ArdourCanvas::Group (*_trackview.canvas_display);
|
||||
|
||||
|
@ -58,7 +59,7 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
|
|||
canvas_rect->property_y1() = 0.0;
|
||||
canvas_rect->property_x2() = max_frames;
|
||||
canvas_rect->property_y2() = (double)20;
|
||||
canvas_rect->property_outline_color_rgba() = Config->canvasvar_MarkerTrack.get();
|
||||
canvas_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerTrack.get();
|
||||
canvas_rect->property_fill_color_rgba() = stream_base_color;
|
||||
|
||||
canvas_rect->signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_marker_time_axis_view_event), canvas_rect, &_trackview));
|
||||
|
|
|
@ -56,9 +56,9 @@ MidiStreamView::MidiStreamView (MidiTimeAxisView& tv)
|
|||
: StreamView (tv)
|
||||
{
|
||||
if (tv.is_track())
|
||||
stream_base_color = Config->canvasvar_MidiTrackBase.get();
|
||||
stream_base_color = ARDOUR_UI::config()->canvasvar_MidiTrackBase.get();
|
||||
else
|
||||
stream_base_color = Config->canvasvar_MidiBusBase.get();
|
||||
stream_base_color = ARDOUR_UI::config()->canvasvar_MidiBusBase.get();
|
||||
|
||||
canvas_rect->property_fill_color_rgba() = stream_base_color;
|
||||
canvas_rect->property_outline_color_rgba() = RGBA_BLACK;
|
||||
|
@ -216,14 +216,14 @@ MidiStreamView::setup_rec_box ()
|
|||
assert(_trackview.midi_track()->mode() == Normal);
|
||||
|
||||
xend = xstart;
|
||||
fill_color = Config->canvasvar_RecordingRect.get();
|
||||
fill_color = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
|
||||
|
||||
ArdourCanvas::SimpleRect * rec_rect = new Gnome::Canvas::SimpleRect (*canvas_group);
|
||||
rec_rect->property_x1() = xstart;
|
||||
rec_rect->property_y1() = 1.0;
|
||||
rec_rect->property_x2() = xend;
|
||||
rec_rect->property_y2() = (double) _trackview.height - 1;
|
||||
rec_rect->property_outline_color_rgba() = Config->canvasvar_RecordingRect.get();
|
||||
rec_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
|
||||
rec_rect->property_fill_color_rgba() = fill_color;
|
||||
rec_rect->lower_to_bottom();
|
||||
|
||||
|
@ -414,12 +414,12 @@ MidiStreamView::color_handler ()
|
|||
|
||||
//case cMidiTrackBase:
|
||||
if (_trackview.is_midi_track()) {
|
||||
canvas_rect->property_fill_color_rgba() = Config->canvasvar_MidiTrackBase.get();
|
||||
canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MidiTrackBase.get();
|
||||
}
|
||||
|
||||
//case cMidiBusBase:
|
||||
if (!_trackview.is_midi_track()) {
|
||||
canvas_rect->property_fill_color_rgba() = Config->canvasvar_MidiBusBase.get();;
|
||||
canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MidiBusBase.get();;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ MidiTimeAxisView::create_automation_child (ParamID param)
|
|||
*track->canvas_display,
|
||||
c->list());
|
||||
|
||||
line->set_line_color (Config->canvasvar_AutomationLine.get());
|
||||
line->set_line_color (ARDOUR_UI::config()->canvasvar_AutomationLine.get());
|
||||
|
||||
track->add_line(*line);
|
||||
|
||||
|
|
|
@ -670,8 +670,8 @@ RouteTimeAxisView::show_timestretch (nframes_t start, nframes_t end)
|
|||
timestretch_rect->property_y1() = 0.0;
|
||||
timestretch_rect->property_x2() = 0.0;
|
||||
timestretch_rect->property_y2() = 0.0;
|
||||
timestretch_rect->property_fill_color_rgba() = Config->canvasvar_TimeStretchFill.get();
|
||||
timestretch_rect->property_outline_color_rgba() = Config->canvasvar_TimeStretchOutline.get();
|
||||
timestretch_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeStretchFill.get();
|
||||
timestretch_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeStretchOutline.get();
|
||||
}
|
||||
|
||||
timestretch_rect->show ();
|
||||
|
@ -1468,11 +1468,11 @@ RouteTimeAxisView::color_handler ()
|
|||
{
|
||||
//case cTimeStretchOutline:
|
||||
if (timestretch_rect) {
|
||||
timestretch_rect->property_outline_color_rgba() = Config->canvasvar_TimeStretchOutline.get();
|
||||
timestretch_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeStretchOutline.get();
|
||||
}
|
||||
//case cTimeStretchFill:
|
||||
if (timestretch_rect) {
|
||||
timestretch_rect->property_fill_color_rgba() = Config->canvasvar_TimeStretchFill.get();
|
||||
timestretch_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeStretchFill.get();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1725,7 +1725,7 @@ RouteTimeAxisView::add_processor_automation_curve (boost::shared_ptr<Processor>
|
|||
*processor, *ran->view, *ran->view->canvas_display,
|
||||
processor->control (what, true)->list());
|
||||
|
||||
ral->set_line_color (Config->canvasvar_ProcessorAutomationLine.get());
|
||||
ral->set_line_color (ARDOUR_UI::config()->canvasvar_ProcessorAutomationLine.get());
|
||||
ral->queue_reset ();
|
||||
|
||||
ran->view->add_line (*ral);
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include "theme_manager.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "ardour_ui.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
@ -88,6 +89,7 @@ ThemeManager::ThemeManager()
|
|||
light_button.signal_toggled().connect (mem_fun (*this, &ThemeManager::on_light_theme_button_toggled));
|
||||
|
||||
set_size_request (-1, 400);
|
||||
setup_theme ();
|
||||
}
|
||||
|
||||
ThemeManager::~ThemeManager()
|
||||
|
@ -109,7 +111,7 @@ ThemeManager::button_press_event (GdkEventButton* ev)
|
|||
int cellx;
|
||||
int celly;
|
||||
|
||||
ARDOUR::ConfigVariable<uint32_t> *ccvar;
|
||||
UIConfigVariable<uint32_t> *ccvar;
|
||||
|
||||
if (!color_display.get_path_at_pos ((int)ev->x, (int)ev->y, path, column, cellx, celly)) {
|
||||
return false;
|
||||
|
@ -129,10 +131,11 @@ ThemeManager::button_press_event (GdkEventButton* ev)
|
|||
|
||||
UINT_TO_RGBA (rgba, &r, &g, &b, &a);
|
||||
color.set_rgb_p (r / 255.0, g / 255.0, b / 255.0);
|
||||
color_dialog.get_colorsel()->set_current_color (color);
|
||||
color_dialog.get_colorsel()->set_previous_color (color);
|
||||
color_dialog.get_colorsel()->set_current_alpha (a * 256);
|
||||
color_dialog.get_colorsel()->set_current_color (color);
|
||||
color_dialog.get_colorsel()->set_previous_alpha (a * 256);
|
||||
color_dialog.get_colorsel()->set_current_alpha (a * 256);
|
||||
|
||||
ResponseType result = (ResponseType) color_dialog.run();
|
||||
|
||||
switch (result) {
|
||||
|
@ -147,6 +150,7 @@ ThemeManager::button_press_event (GdkEventButton* ev)
|
|||
|
||||
rgba = RGBA_TO_UINT(r,g,b,a>>8);
|
||||
//cerr << (*iter)[columns.name] << " == " << hex << rgba << endl;
|
||||
//cerr << "a = " << a << endl;
|
||||
(*iter)[columns.rgba] = rgba;
|
||||
(*iter)[columns.gdkcolor] = color;
|
||||
|
||||
|
@ -200,8 +204,8 @@ ThemeManager::on_dark_theme_button_toggled()
|
|||
{
|
||||
if (!dark_button.get_active()) return;
|
||||
|
||||
Config->set_ui_rc_file("ardour2_ui_dark.rc");
|
||||
load_rc_file (Config->get_ui_rc_file());
|
||||
ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_light.rc");
|
||||
load_rc_file (ARDOUR_UI::config()->ui_rc_file.get());
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -209,15 +213,15 @@ ThemeManager::on_light_theme_button_toggled()
|
|||
{
|
||||
if (!light_button.get_active()) return;
|
||||
|
||||
Config->set_ui_rc_file("ardour2_ui_light.rc");
|
||||
load_rc_file (Config->get_ui_rc_file());
|
||||
ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_light.rc");
|
||||
load_rc_file (ARDOUR_UI::config()->ui_rc_file.get());
|
||||
}
|
||||
|
||||
void
|
||||
ThemeManager::setup_theme ()
|
||||
{
|
||||
int r, g, b, a;
|
||||
for (std::vector<ConfigVariable<uint32_t> *>::iterator i = Config->canvas_colors.begin(); i != Config->canvas_colors.end(); i++) {
|
||||
for (std::vector<UIConfigVariable<uint32_t> *>::iterator i = ARDOUR_UI::config()->canvas_colors.begin(); i != ARDOUR_UI::config()->canvas_colors.end(); i++) {
|
||||
|
||||
TreeModel::Row row = *(color_list->append());
|
||||
|
||||
|
@ -233,7 +237,6 @@ ThemeManager::setup_theme ()
|
|||
row[columns.rgba] = rgba;
|
||||
row[columns.gdkcolor] = col;
|
||||
|
||||
//cerr << (*i)->name() << " == " << rgba << endl;
|
||||
}
|
||||
|
||||
ColorsChanged.emit();
|
||||
|
@ -242,7 +245,7 @@ ThemeManager::setup_theme ()
|
|||
string rcfile = Glib::getenv("ARDOUR2_UI_RC", env_defined);
|
||||
|
||||
if(!env_defined) {
|
||||
rcfile = Config->get_ui_rc_file();
|
||||
rcfile = ARDOUR_UI::config()->ui_rc_file.get();
|
||||
}
|
||||
|
||||
if (rcfile == "ardour2_ui_dark.rc") {
|
||||
|
|
|
@ -26,9 +26,8 @@
|
|||
#include <gtkmm/colorselection.h>
|
||||
#include <gtkmm/radiobutton.h>
|
||||
#include <gtkmm/rc.h>
|
||||
#include <ardour/configuration.h>
|
||||
#include "ardour_dialog.h"
|
||||
|
||||
#include "ui_config.h"
|
||||
|
||||
class ThemeManager : public ArdourDialog
|
||||
{
|
||||
|
@ -55,7 +54,7 @@ class ThemeManager : public ArdourDialog
|
|||
Gtk::TreeModelColumn<Glib::ustring> name;
|
||||
Gtk::TreeModelColumn<Glib::ustring> color;
|
||||
Gtk::TreeModelColumn<Gdk::Color> gdkcolor;
|
||||
Gtk::TreeModelColumn<ARDOUR::ConfigVariable<uint32_t> *> pVar;
|
||||
Gtk::TreeModelColumn<UIConfigVariable<uint32_t> *> pVar;
|
||||
Gtk::TreeModelColumn<uint32_t> rgba;
|
||||
};
|
||||
|
||||
|
@ -71,6 +70,5 @@ class ThemeManager : public ArdourDialog
|
|||
bool button_press_event (GdkEventButton*);
|
||||
};
|
||||
|
||||
|
||||
#endif /* __ardour_gtk_color_manager_h__ */
|
||||
|
||||
|
|
|
@ -787,20 +787,20 @@ TimeAxisView::get_selection_rect (uint32_t id)
|
|||
rect->rect->property_y1() = 0.0;
|
||||
rect->rect->property_x2() = 0.0;
|
||||
rect->rect->property_y2() = 0.0;
|
||||
rect->rect->property_fill_color_rgba() = Config->canvasvar_SelectionRect.get();
|
||||
rect->rect->property_outline_color_rgba() = Config->canvasvar_Selection.get();
|
||||
rect->rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_SelectionRect.get();
|
||||
rect->rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
|
||||
rect->start_trim = new SimpleRect (*selection_group);
|
||||
rect->start_trim->property_x1() = 0.0;
|
||||
rect->start_trim->property_x2() = 0.0;
|
||||
rect->start_trim->property_fill_color_rgba() = Config->canvasvar_Selection.get();
|
||||
rect->start_trim->property_outline_color_rgba() = Config->canvasvar_Selection.get();
|
||||
rect->start_trim->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
rect->start_trim->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
|
||||
rect->end_trim = new SimpleRect (*selection_group);
|
||||
rect->end_trim->property_x1() = 0.0;
|
||||
rect->end_trim->property_x2() = 0.0;
|
||||
rect->end_trim->property_fill_color_rgba() = Config->canvasvar_Selection.get();
|
||||
rect->end_trim->property_outline_color_rgba() = Config->canvasvar_Selection.get();
|
||||
rect->end_trim->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
rect->end_trim->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
|
||||
free_selection_rects.push_front (rect);
|
||||
|
||||
|
@ -1061,26 +1061,26 @@ TimeAxisView::color_handler ()
|
|||
|
||||
for (list<SelectionRect*>::iterator i = used_selection_rects.begin(); i != used_selection_rects.end(); ++i) {
|
||||
|
||||
(*i)->rect->property_fill_color_rgba() = Config->canvasvar_SelectionRect.get();
|
||||
(*i)->rect->property_outline_color_rgba() = Config->canvasvar_Selection.get();
|
||||
(*i)->rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_SelectionRect.get();
|
||||
(*i)->rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
|
||||
(*i)->start_trim->property_fill_color_rgba() = Config->canvasvar_Selection.get();
|
||||
(*i)->start_trim->property_outline_color_rgba() = Config->canvasvar_Selection.get();
|
||||
(*i)->start_trim->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
(*i)->start_trim->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
|
||||
(*i)->end_trim->property_fill_color_rgba() = Config->canvasvar_Selection.get();
|
||||
(*i)->end_trim->property_outline_color_rgba() = Config->canvasvar_Selection.get();
|
||||
(*i)->end_trim->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
(*i)->end_trim->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
}
|
||||
|
||||
for (list<SelectionRect*>::iterator i = free_selection_rects.begin(); i != free_selection_rects.end(); ++i) {
|
||||
|
||||
(*i)->rect->property_fill_color_rgba() = Config->canvasvar_SelectionRect.get();
|
||||
(*i)->rect->property_outline_color_rgba() = Config->canvasvar_Selection.get();
|
||||
(*i)->rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_SelectionRect.get();
|
||||
(*i)->rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
|
||||
(*i)->start_trim->property_fill_color_rgba() = Config->canvasvar_Selection.get();
|
||||
(*i)->start_trim->property_outline_color_rgba() = Config->canvasvar_Selection.get();
|
||||
(*i)->start_trim->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
(*i)->start_trim->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
|
||||
(*i)->end_trim->property_fill_color_rgba() = Config->canvasvar_Selection.get();
|
||||
(*i)->end_trim->property_outline_color_rgba() = Config->canvasvar_Selection.get();
|
||||
(*i)->end_trim->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
(*i)->end_trim->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_Selection.get();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "utils.h"
|
||||
#include "canvas_impl.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "ardour_ui.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
@ -151,8 +152,8 @@ TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color& base_colo
|
|||
vestigial_frame->property_y1() = (double) 1.0;
|
||||
vestigial_frame->property_x2() = 2.0;
|
||||
vestigial_frame->property_y2() = (double) trackview.height;
|
||||
vestigial_frame->property_outline_color_rgba() = Config->canvasvar_VestigialFrame.get();
|
||||
vestigial_frame->property_fill_color_rgba() = Config->canvasvar_VestigialFrame.get();
|
||||
vestigial_frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_VestigialFrame.get();
|
||||
vestigial_frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_VestigialFrame.get();
|
||||
vestigial_frame->hide ();
|
||||
|
||||
if (visibility & ShowFrame) {
|
||||
|
@ -161,8 +162,8 @@ TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color& base_colo
|
|||
frame->property_y1() = (double) 1.0;
|
||||
frame->property_x2() = (double) trackview.editor.frame_to_pixel(duration);
|
||||
frame->property_y2() = (double) trackview.height;
|
||||
frame->property_outline_color_rgba() = Config->canvasvar_TimeAxisFrame.get();
|
||||
frame->property_fill_color_rgba() = Config->canvasvar_TimeAxisFrame.get();
|
||||
frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get();
|
||||
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get();
|
||||
|
||||
/* by default draw all 4 edges */
|
||||
|
||||
|
@ -197,8 +198,8 @@ TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color& base_colo
|
|||
}
|
||||
name_highlight->property_y1() = (double) (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE);
|
||||
name_highlight->property_y2() = (double) (trackview.height - 1);
|
||||
name_highlight->property_outline_color_rgba() = Config->canvasvar_NameHighlightFill.get();
|
||||
name_highlight->property_fill_color_rgba() = Config->canvasvar_NameHighlightOutline.get();
|
||||
name_highlight->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_NameHighlightFill.get();
|
||||
name_highlight->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_NameHighlightOutline.get();
|
||||
|
||||
name_highlight->set_data ("timeaxisviewitem", this);
|
||||
|
||||
|
@ -230,16 +231,16 @@ TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color& base_colo
|
|||
frame_handle_start->property_x2() = (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH;
|
||||
frame_handle_start->property_y1() = (double) 1.0;
|
||||
frame_handle_start->property_y2() = (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH+1;
|
||||
frame_handle_start->property_outline_color_rgba() = Config->canvasvar_FrameHandle.get();
|
||||
frame_handle_start->property_fill_color_rgba() = Config->canvasvar_FrameHandle.get();
|
||||
frame_handle_start->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_FrameHandle.get();
|
||||
frame_handle_start->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_FrameHandle.get();
|
||||
|
||||
frame_handle_end = new ArdourCanvas::SimpleRect (*group);
|
||||
frame_handle_end->property_x1() = (double) (trackview.editor.frame_to_pixel(get_duration())) - (TimeAxisViewItem::GRAB_HANDLE_LENGTH);
|
||||
frame_handle_end->property_x2() = (double) trackview.editor.frame_to_pixel(get_duration());
|
||||
frame_handle_end->property_y1() = (double) 1;
|
||||
frame_handle_end->property_y2() = (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH + 1;
|
||||
frame_handle_end->property_outline_color_rgba() = Config->canvasvar_FrameHandle.get();
|
||||
frame_handle_end->property_fill_color_rgba() = Config->canvasvar_FrameHandle.get();
|
||||
frame_handle_end->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_FrameHandle.get();
|
||||
frame_handle_end->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_FrameHandle.get();
|
||||
|
||||
} else {
|
||||
frame_handle_start = 0;
|
||||
|
@ -798,10 +799,10 @@ TimeAxisViewItem::set_frame_color()
|
|||
uint32_t r,g,b,a;
|
||||
|
||||
if (_selected && should_show_selection) {
|
||||
UINT_TO_RGBA(Config->canvasvar_SelectedFrameBase.get(), &r, &g, &b, &a);
|
||||
UINT_TO_RGBA(ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get(), &r, &g, &b, &a);
|
||||
frame->property_fill_color_rgba() = RGBA_TO_UINT(r, g, b, a);
|
||||
} else {
|
||||
UINT_TO_RGBA(Config->canvasvar_FrameBase.get(), &r, &g, &b, &a);
|
||||
UINT_TO_RGBA(ARDOUR_UI::config()->canvasvar_FrameBase.get(), &r, &g, &b, &a);
|
||||
frame->property_fill_color_rgba() = RGBA_TO_UINT(r, g, b, a);
|
||||
}
|
||||
}
|
||||
|
@ -816,11 +817,11 @@ TimeAxisViewItem::set_trim_handle_colors()
|
|||
{
|
||||
if (frame_handle_start) {
|
||||
if (position_locked) {
|
||||
frame_handle_start->property_fill_color_rgba() = Config->canvasvar_TrimHandleLocked.get();
|
||||
frame_handle_end->property_fill_color_rgba() = Config->canvasvar_TrimHandleLocked.get();
|
||||
frame_handle_start->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TrimHandleLocked.get();
|
||||
frame_handle_end->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TrimHandleLocked.get();
|
||||
} else {
|
||||
frame_handle_start->property_fill_color_rgba() = Config->canvasvar_TrimHandle.get();
|
||||
frame_handle_end->property_fill_color_rgba() = Config->canvasvar_TrimHandle.get();
|
||||
frame_handle_start->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TrimHandle.get();
|
||||
frame_handle_end->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TrimHandle.get();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
UI_CONFIG_VARIABLE(std::string, ui_rc_file, "ui-rc-file", "ardour2_ui_dark.rc")
|
||||
|
|
@ -54,8 +54,6 @@ class Configuration : public PBD::Stateful
|
|||
|
||||
std::map<std::string,MidiPortDescriptor *> midi_ports;
|
||||
|
||||
std::vector<ConfigVariable<uint32_t> *> canvas_colors;
|
||||
|
||||
void map_parameters (sigc::slot<void,const char*> theSlot);
|
||||
|
||||
int load_state ();
|
||||
|
@ -70,7 +68,6 @@ class Configuration : public PBD::Stateful
|
|||
XMLNode& get_state (void);
|
||||
XMLNode& get_variables (sigc::slot<bool,ConfigVariableBase::Owner>, std::string which_node = "Config");
|
||||
void set_variables (const XMLNode&, ConfigVariableBase::Owner owner);
|
||||
void pack_canvasvars ();
|
||||
|
||||
void set_current_owner (ConfigVariableBase::Owner);
|
||||
|
||||
|
@ -104,13 +101,6 @@ class Configuration : public PBD::Stateful
|
|||
#undef CONFIG_VARIABLE
|
||||
#undef CONFIG_VARIABLE_SPECIAL
|
||||
|
||||
public: /* ugh */
|
||||
#undef CANVAS_VARIABLE
|
||||
#define CANVAS_VARIABLE(var,name) ConfigVariable<uint32_t> var; // <-- is this really so bad?
|
||||
#include "ardour/canvas_vars.h"
|
||||
#undef CANVAS_VARIABLE
|
||||
|
||||
private:
|
||||
ConfigVariableBase::Owner current_owner;
|
||||
XMLNode* _control_protocol_state;
|
||||
|
||||
|
|
|
@ -83,11 +83,6 @@ class ConfigVariable : public ConfigVariableBase
|
|||
|
||||
void add_to_node (XMLNode& node) {
|
||||
std::stringstream ss;
|
||||
if (node.name() == "Canvas") {
|
||||
ss << std::hex;
|
||||
ss.fill('0');
|
||||
ss.width(8);
|
||||
}
|
||||
ss << value;
|
||||
show_stored_value (ss.str());
|
||||
XMLNode* child = new XMLNode ("Option");
|
||||
|
@ -98,7 +93,7 @@ class ConfigVariable : public ConfigVariableBase
|
|||
|
||||
bool set_from_node (const XMLNode& node, Owner owner) {
|
||||
|
||||
if (node.name() == "Config" || node.name() == "Canvas") {
|
||||
if (node.name() == "Config") {
|
||||
|
||||
/* ardour.rc */
|
||||
|
||||
|
@ -118,8 +113,6 @@ class ConfigVariable : public ConfigVariableBase
|
|||
if (prop->value() == _name) {
|
||||
if ((prop = child->property ("value")) != 0) {
|
||||
std::stringstream ss;
|
||||
if (node.name() == "Canvas")
|
||||
ss << std::hex;
|
||||
ss << prop->value();
|
||||
ss >> value;
|
||||
_owner = (ConfigVariableBase::Owner)(_owner |owner);
|
||||
|
|
|
@ -143,10 +143,6 @@ CONFIG_VARIABLE (bool, periodic_safety_backups, "periodic-safety-backups", true)
|
|||
CONFIG_VARIABLE (uint32_t, periodic_safety_backup_interval, "periodic-safety-backup-interval", 120)
|
||||
CONFIG_VARIABLE (string, possible_audio_file_regexp, "possible-audio-file-regexp", "\\.(wav|aiff|caf|w64|L|R)$")
|
||||
|
||||
/* Theme */
|
||||
|
||||
CONFIG_VARIABLE (string, ui_rc_file, "ui-rc-file", "ardour2_ui_dark.rc")
|
||||
|
||||
/* denormal management */
|
||||
|
||||
CONFIG_VARIABLE (bool, denormal_protection, "denormal-protection", false)
|
||||
|
|
|
@ -55,10 +55,6 @@ Configuration::Configuration ()
|
|||
#undef CONFIG_VARIABLE
|
||||
#undef CONFIG_VARIABLE_SPECIAL
|
||||
|
||||
#undef CANVAS_VARIABLE
|
||||
#define CANVAS_VARIABLE(var,name) var (name), // <-- is this really so bad?
|
||||
#include "ardour/canvas_vars.h"
|
||||
#undef CANVAS_VARIABLE
|
||||
|
||||
current_owner (ConfigVariableBase::Default)
|
||||
{
|
||||
|
@ -137,7 +133,6 @@ Configuration::load_state ()
|
|||
if (!found)
|
||||
error << "Ardour: could not find configuration file (ardour.rc), canvas will look broken." << endmsg;
|
||||
|
||||
pack_canvasvars();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -206,7 +201,6 @@ Configuration::get_state ()
|
|||
}
|
||||
|
||||
root->add_child_nocopy (get_variables (sigc::mem_fun (*this, &Configuration::save_config_options_predicate), "Config"));
|
||||
root->add_child_nocopy (get_variables (sigc::mem_fun (*this, &Configuration::save_config_options_predicate), "Canvas"));
|
||||
|
||||
if (_extra_xml) {
|
||||
root->add_child_copy (*_extra_xml);
|
||||
|
@ -235,11 +229,6 @@ Configuration::get_variables (sigc::slot<bool,ConfigVariableBase::Owner> predica
|
|||
#undef CONFIG_VARIABLE
|
||||
#undef CONFIG_VARIABLE_SPECIAL
|
||||
|
||||
#undef CANVAS_VARIABLE
|
||||
#define CANVAS_VARIABLE(var,Name) if (node->name() == "Canvas") { if (predicate (ConfigVariableBase::Config)) { var.add_to_node (*node); }}
|
||||
#include "ardour/canvas_vars.h"
|
||||
#undef CANVAS_VARIABLE
|
||||
|
||||
return *node;
|
||||
}
|
||||
|
||||
|
@ -271,7 +260,7 @@ Configuration::set_state (const XMLNode& root)
|
|||
warning << _("ill-formed MIDI port specification in ardour rcfile (ignored)") << endmsg;
|
||||
}
|
||||
|
||||
} else if (node->name() == "Config" || node->name() == "Canvas" ) {
|
||||
} else if (node->name() == "Config") {
|
||||
|
||||
set_variables (*node, ConfigVariableBase::Config);
|
||||
|
||||
|
@ -304,26 +293,7 @@ Configuration::set_variables (const XMLNode& node, ConfigVariableBase::Owner own
|
|||
|
||||
#include "ardour/configuration_vars.h"
|
||||
#undef CONFIG_VARIABLE
|
||||
#undef CONFIG_VARIABLE_SPECIAL
|
||||
|
||||
#undef CANVAS_VARIABLE
|
||||
#define CANVAS_VARIABLE(var,name) \
|
||||
if (var.set_from_node (node, owner)) { \
|
||||
ParameterChanged (name); \
|
||||
}
|
||||
#include "ardour/canvas_vars.h"
|
||||
#undef CANVAS_VARIABLE
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
Configuration::pack_canvasvars ()
|
||||
{
|
||||
#undef CANVAS_VARIABLE
|
||||
#define CANVAS_VARIABLE(var,name) canvas_colors.push_back(&var);
|
||||
#include "ardour/canvas_vars.h"
|
||||
#undef CANVAS_VARIABLE
|
||||
cerr << "Configuration::pack_canvasvars () called, canvas_colors.size() = " << canvas_colors.size() << endl;
|
||||
#undef CONFIG_VARIABLE_SPECIAL
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue