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:
parent
4fca993a84
commit
87fdfecf74
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -531,6 +531,7 @@ TimeAxisViewItem::set_height (double height)
|
||||
vestigial_frame->property_y2() = height - 1;
|
||||
|
||||
update_name_pixbuf_visibility ();
|
||||
set_colors ();
|
||||
}
|
||||
|
||||
void
|
||||
@ -691,12 +692,18 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user