summaryrefslogtreecommitdiff
path: root/gtk2_ardour/time_axis_view_item.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-02-08 14:09:42 +0000
committerCarl Hetherington <carl@carlh.net>2011-02-08 14:09:42 +0000
commit87fdfecf74d2a379cb9969bfacfe4bdf07401ba3 (patch)
tree03b9fa4f729fe86bc4910f85787204cba70d2016 /gtk2_ardour/time_axis_view_item.cc
parent4fca993a840368e8313827676f7a63e1c79af32d (diff)
Change the background colour of regions when they are small enough to not show the name bar (#3575).
git-svn-id: svn://localhost/ardour2/branches/3.0@8771 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view_item.cc')
-rw-r--r--gtk2_ardour/time_axis_view_item.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc
index f0dd9a7984..8220536508 100644
--- a/gtk2_ardour/time_axis_view_item.cc
+++ b/gtk2_ardour/time_axis_view_item.cc
@@ -531,6 +531,7 @@ TimeAxisViewItem::set_height (double height)
vestigial_frame->property_y2() = height - 1;
update_name_pixbuf_visibility ();
+ set_colors ();
}
void
@@ -691,13 +692,19 @@ TimeAxisViewItem::set_frame_color()
} else {
if (_recregion) {
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
- } else {
+ } else if (high_enough_for_name) {
if (fill_opacity) {
frame->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_FrameBase.get(), fill_opacity);
} else {
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_FrameBase.get();
}
- }
+ } else {
+ if (fill_opacity) {
+ frame->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (fill_color, fill_opacity);
+ } else {
+ frame->property_fill_color_rgba() = fill_color;
+ }
+ }
}
}