summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-02-08 14:06:58 +0000
committerCarl Hetherington <carl@carlh.net>2011-02-08 14:06:58 +0000
commitff6038a7b70c1945843dcd44ffe666d297949e91 (patch)
tree34287557a594fbf128fa68751065885c871c908b /gtk2_ardour
parentd9c4625ff55fd93d7cd69c8b9e2e09b6f97095e0 (diff)
Minor tidy-up.
git-svn-id: svn://localhost/ardour2/branches/3.0@8768 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/time_axis_view_item.cc23
1 files 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();
}
}
}