13
0

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
This commit is contained in:
Carl Hetherington 2011-02-08 14:09:42 +00:00
parent 4fca993a84
commit 87fdfecf74
2 changed files with 19 additions and 8 deletions

View File

@ -2868,12 +2868,16 @@ MidiRegionView::note_mouse_position (float x_fraction, float /*y_fraction*/, boo
void
MidiRegionView::set_frame_color()
{
if (frame) {
if (_selected) {
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get();
} else {
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MidiFrameBase.get();
}
if (!frame) {
return;
}
if (_selected) {
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get();
} else if (high_enough_for_name) {
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MidiFrameBase.get();
} else {
frame->property_fill_color_rgba() = fill_color;
}
}

View File

@ -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;
}
}
}
}