Fixed a small bug: d25 material list view background was reset to black with Auto background color

This commit is contained in:
Matthias Koefferlein 2022-12-13 22:49:49 +01:00
parent fd5ae12951
commit 199dea536a
1 changed files with 4 additions and 0 deletions

View File

@ -125,6 +125,10 @@ bool D25View::configure(const std::string &name, const std::string &value)
tl::Color bg;
lc.from_string (value, bg);
if (! bg.is_valid ()) {
bg = view () ? view ()->background_color () : Qt::white;
}
QPalette palette = mp_ui->material_list->palette ();
palette.setColor (QPalette::Base, bg.to_qc ());
palette.setColor (QPalette::Text, bg.to_mono () ? Qt::black : Qt::white);