Consistently color regions when using name bars

With name-bars the region was colored using the track color
if the region is not high enough to show the name-bar.
This happened regardless of the color-regions-using-track-color
preference IFF name-bars were enabled.

However set_color/get_fill_color() is not called when the track-height
changes "high_enough_for_name". This lead to inconsistently colored
regions, some with a background some without.
This commit is contained in:
Robin Gareus 2022-09-14 20:49:04 +02:00
parent 5e26c9c277
commit a30d526af0
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -685,8 +685,7 @@ TimeAxisViewItem::get_fill_color () const
return UIConfiguration::instance().color ("selected region base");
} else if (_recregion) {
return UIConfiguration::instance().color ("recording rect");
} else if ((!UIConfiguration::instance().get_show_name_highlight() || high_enough_for_name) &&
!UIConfiguration::instance().get_color_regions_using_track_color()) {
} else if (!UIConfiguration::instance().get_color_regions_using_track_color()) {
return UIConfiguration::instance().color_mod (fill_color_name, mod_name);
}
return UIConfiguration::instance().color_mod (fill_color, mod_name);