provide default custom background values

pull/19/head
Michail Vourlakos 5 years ago
parent a787567bf2
commit 835c24cbcb

@ -147,11 +147,17 @@ void DetailsHandler::loadLayout(const Data::Layout &data)
} }
m_ui->colorPatternWidget->setBackground(m_colorsModel->colorPath(data.color)); m_ui->colorPatternWidget->setBackground(m_colorsModel->colorPath(data.color));
m_ui->colorPatternWidget->setTextColor(Layout::AbstractLayout::defaultTextColor(data.color));
m_ui->colorsCmb->setCurrentIndex(m_colorsModel->row(data.color)); m_ui->colorsCmb->setCurrentIndex(m_colorsModel->row(data.color));
m_ui->backPatternWidget->setBackground(data.background);
m_ui->colorPatternWidget->setTextColor(Layout::AbstractLayout::defaultTextColor(data.color)); if (data.background.isEmpty()) {
m_ui->backPatternWidget->setTextColor(data.textColor); m_ui->backPatternWidget->setBackground(m_colorsModel->colorPath("defaultcustom"));
m_ui->backPatternWidget->setTextColor("#3C1C00");
} else {
m_ui->backPatternWidget->setBackground(data.background);
m_ui->backPatternWidget->setTextColor(data.textColor);
}
m_ui->inMenuChk->setChecked(data.isShownInMenu); m_ui->inMenuChk->setChecked(data.isShownInMenu);
m_ui->borderlessChk->setChecked(data.hasDisabledBorders); m_ui->borderlessChk->setChecked(data.hasDisabledBorders);

@ -35,7 +35,7 @@ Colors::Colors(QObject *parent, Latte::Corona *corona)
m_corona(corona) m_corona(corona)
{ {
//!find the available colors //!find the available colors
m_colorsPath = m_corona->kPackage().path() + "../../plasmoids/org.kde.latte.containment/contents/icons/"; m_colorsPath = m_corona->kPackage().path() + "../../shells/org.kde.latte.shell/contents/images/canvas/";
init(); init();
} }

@ -103,7 +103,6 @@ void PatternWidget::setTextColor(const QString &color)
} }
m_textColor = color; m_textColor = color;
m_textColorBrightness = Latte::colorBrightness(QColor(color)); m_textColorBrightness = Latte::colorBrightness(QColor(color));
emit textColorChanged(); emit textColorChanged();
@ -122,7 +121,7 @@ void PatternWidget::updateUi()
background = "background-image: none;"; background = "background-image: none;";
m_shadowEffect->setColor(Qt::transparent); m_shadowEffect->setColor(Qt::transparent);
} else { } else {
m_shadowEffect->setColor(Qt::black); m_shadowEffect->setColor("#020202");
} }
if (m_textColorBrightness > 127) { if (m_textColorBrightness > 127) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Loading…
Cancel
Save