From ff6038a7b70c1945843dcd44ffe666d297949e91 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 8 Feb 2011 14:06:58 +0000 Subject: [PATCH] Minor tidy-up. git-svn-id: svn://localhost/ardour2/branches/3.0@8768 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/time_axis_view_item.cc | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index 9feef96660..0a2c815c48 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -694,19 +694,20 @@ TimeAxisViewItem::set_colors() void TimeAxisViewItem::set_frame_color() { - if (frame) { - uint32_t r,g,b,a; - - if (_selected && should_show_selection) { - 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); + if (!frame) { + return; + } + + if (_selected && should_show_selection) { + frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get(); + } else { + if (_recregion) { + frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get(); } else { - if (_recregion) { - UINT_TO_RGBA(ARDOUR_UI::config()->canvasvar_RecordingRect.get(), &r, &g, &b, &a); - frame->property_fill_color_rgba() = RGBA_TO_UINT(r, g, b, a); + if (fill_opacity) { + frame->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_FrameBase.get(), fill_opacity); } else { - UINT_TO_RGBA(ARDOUR_UI::config()->canvasvar_FrameBase.get(), &r, &g, &b, &a); - frame->property_fill_color_rgba() = RGBA_TO_UINT(r, g, b, fill_opacity ? fill_opacity : a); + frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_FrameBase.get(); } } }