draw custom text color for default custombackground

work/spdx
Michail Vourlakos 4 years ago
parent 82ce6b5140
commit b8229ac199

@ -184,7 +184,7 @@ QString GenericLayout::background() const
QString GenericLayout::textColor() const
{
if (backgroundStyle() == Layout::PatternBackgroundStyle && customBackground().isEmpty()) {
if (backgroundStyle() == Layout::PatternBackgroundStyle && customBackground().isEmpty() && customTextColor().isEmpty()) {
return AbstractLayout::defaultCustomTextColor();
}

@ -180,9 +180,13 @@ void DetailsHandler::loadLayout(const Latte::Data::Layout &data)
if (data.background.isEmpty()) {
m_ui->backPatternWidget->setBackground(m_colorsModel->colorPath(Latte::Layout::AbstractLayout::defaultCustomBackground()));
m_ui->backPatternWidget->setTextColor(Latte::Layout::AbstractLayout::defaultCustomTextColor());
} else {
m_ui->backPatternWidget->setBackground(data.background);
}
if (data.background.isEmpty() && data.textColor.isEmpty()) {
m_ui->backPatternWidget->setTextColor(Latte::Layout::AbstractLayout::defaultCustomTextColor());
} else {
m_ui->backPatternWidget->setTextColor(data.textColor);
}

Loading…
Cancel
Save