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
|
void
|
||||||
MidiRegionView::set_frame_color()
|
MidiRegionView::set_frame_color()
|
||||||
{
|
{
|
||||||
if (frame) {
|
if (!frame) {
|
||||||
if (_selected) {
|
return;
|
||||||
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get();
|
}
|
||||||
} else {
|
|
||||||
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MidiFrameBase.get();
|
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;
|
vestigial_frame->property_y2() = height - 1;
|
||||||
|
|
||||||
update_name_pixbuf_visibility ();
|
update_name_pixbuf_visibility ();
|
||||||
|
set_colors ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -691,12 +692,18 @@ TimeAxisViewItem::set_frame_color()
|
|||||||
} else {
|
} else {
|
||||||
if (_recregion) {
|
if (_recregion) {
|
||||||
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
|
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
|
||||||
} else {
|
} else if (high_enough_for_name) {
|
||||||
if (fill_opacity) {
|
if (fill_opacity) {
|
||||||
frame->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_FrameBase.get(), fill_opacity);
|
frame->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_FrameBase.get(), fill_opacity);
|
||||||
} else {
|
} else {
|
||||||
frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_FrameBase.get();
|
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