Minor tidy-up.
authorCarl Hetherington <carl@carlh.net>
Tue, 8 Feb 2011 14:06:58 +0000 (14:06 +0000)
committerCarl Hetherington <carl@carlh.net>
Tue, 8 Feb 2011 14:06:58 +0000 (14:06 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8768 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/time_axis_view_item.cc

index 9feef96660b0afeed186eb4a303fc098b440000f..0a2c815c48211415583a82a8f97ba9f9c80f0cd4 100644 (file)
@@ -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();
                        }
                }
        }