From 9b36d0c57d382c08a14faa1d1fd682f913da26c8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 2 Feb 2008 01:54:01 +0000 Subject: [PATCH] Move selected/unselected region/waveform colours to colour file for configurability. Changed the region selection colour in the default theme to match the track selection colour (and the tool one, and the MIDI one in 3.0, and....). (Note: If someone hates these colours, the old "reverse video" like behaviour can still be done in the colour file or w/ the theme manager). git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2987 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour2_ui_default.conf | 19 ++++++++++--------- gtk2_ardour/audio_region_view.cc | 9 +++++---- gtk2_ardour/canvas_vars.h | 2 ++ 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/gtk2_ardour/ardour2_ui_default.conf b/gtk2_ardour/ardour2_ui_default.conf index 5ed91397c7..8615d8e6d1 100644 --- a/gtk2_ardour/ardour2_ui_default.conf +++ b/gtk2_ardour/ardour2_ui_default.conf @@ -1,11 +1,13 @@ - - diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index a440de50da..8f5413560a 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -1178,14 +1178,15 @@ AudioRegionView::set_frame_color () uint32_t r,g,b,a; if (_selected && should_show_selection) { - frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_WaveForm.get(); + UINT_TO_RGBA(ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get(), &r, &g, &b, &a); + frame->property_fill_color_rgba() = RGBA_TO_UINT(r, g, b, fill_opacity ? fill_opacity : a); - UINT_TO_RGBA(ARDOUR_UI::config()->canvasvar_FrameBase.get(), &r, &g, &b, &a); for (vector::iterator w = waves.begin(); w != waves.end(); ++w) { if (_region->muted()) { - (*w)->property_wave_color() = RGBA_TO_UINT(r, g, b, MUTED_ALPHA); + (*w)->property_wave_color() = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->canvasvar_SelectedWaveForm.get(), MUTED_ALPHA); } else { - (*w)->property_wave_color() = RGBA_TO_UINT(r, g, b, fill_opacity ? fill_opacity : a);// Lets still use the theme's opacity value if Opaque is not set + (*w)->property_wave_color() = ARDOUR_UI::config()->canvasvar_SelectedWaveForm.get(); + (*w)->property_fill_color() = ARDOUR_UI::config()->canvasvar_SelectedWaveFormFill.get(); } } } else { diff --git a/gtk2_ardour/canvas_vars.h b/gtk2_ardour/canvas_vars.h index ee54682f96..d4acf8ec9b 100644 --- a/gtk2_ardour/canvas_vars.h +++ b/gtk2_ardour/canvas_vars.h @@ -1,5 +1,7 @@ CANVAS_VARIABLE(canvasvar_WaveForm, "waveform outline") CANVAS_VARIABLE(canvasvar_WaveFormFill, "waveform fill") +CANVAS_VARIABLE(canvasvar_SelectedWaveForm, "selected waveform outline") +CANVAS_VARIABLE(canvasvar_SelectedWaveFormFill, "selected waveform fill") CANVAS_VARIABLE(canvasvar_WaveFormClip, "clipped waveform") CANVAS_VARIABLE(canvasvar_FrameBase, "region base") CANVAS_VARIABLE(canvasvar_SelectedFrameBase, "selected region base") -- 2.30.2