1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-23 01:33:50 +03:00

draw custom text color for default custombackground

This commit is contained in:
Michail Vourlakos 2021-03-24 13:18:07 +02:00
parent 82ce6b5140
commit b8229ac199
2 changed files with 6 additions and 2 deletions

View File

@ -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();
}

View File

@ -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);
}