diff options
author | Doug McLain <doug@nostar.net> | 2007-06-29 17:13:09 +0000 |
---|---|---|
committer | Doug McLain <doug@nostar.net> | 2007-06-29 17:13:09 +0000 |
commit | 4c000c13eecf4cb3d63be304fc0056ddaa35bb21 (patch) | |
tree | 257f65636491f137abb7d3282661080bc5dfce8b /gtk2_ardour/time_axis_view_item.cc | |
parent | a67dcdc267bc133cab63e0e6355edbfa5dacb6ab (diff) |
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
Diffstat (limited to 'gtk2_ardour/time_axis_view_item.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view_item.cc | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index b5c85f9b13..289686c7ce 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -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(); } } } |