From 835c24cbcbe3ab1214b500b45584578b9affb637 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Thu, 30 Jul 2020 16:46:02 +0300 Subject: [PATCH] provide default custom background values --- app/settings/handlers/detailshandler.cpp | 14 ++++++++++---- app/settings/models/colorsmodel.cpp | 2 +- app/settings/widgets/patternwidget.cpp | 3 +-- .../images/canvas/defaultcustomprint.jpg | Bin 0 -> 46773 bytes 4 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 shell/package/contents/images/canvas/defaultcustomprint.jpg diff --git a/app/settings/handlers/detailshandler.cpp b/app/settings/handlers/detailshandler.cpp index 10d3b0386..ebe3b96fe 100644 --- a/app/settings/handlers/detailshandler.cpp +++ b/app/settings/handlers/detailshandler.cpp @@ -147,11 +147,17 @@ void DetailsHandler::loadLayout(const Data::Layout &data) } m_ui->colorPatternWidget->setBackground(m_colorsModel->colorPath(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)); - m_ui->backPatternWidget->setTextColor(data.textColor); + + m_ui->colorsCmb->setCurrentIndex(m_colorsModel->row(data.color)); + + if (data.background.isEmpty()) { + 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->borderlessChk->setChecked(data.hasDisabledBorders); diff --git a/app/settings/models/colorsmodel.cpp b/app/settings/models/colorsmodel.cpp index 8a6e69a70..25abd3763 100644 --- a/app/settings/models/colorsmodel.cpp +++ b/app/settings/models/colorsmodel.cpp @@ -35,7 +35,7 @@ Colors::Colors(QObject *parent, Latte::Corona *corona) m_corona(corona) { //!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(); } diff --git a/app/settings/widgets/patternwidget.cpp b/app/settings/widgets/patternwidget.cpp index 5ec34bbcf..2e3d38e73 100644 --- a/app/settings/widgets/patternwidget.cpp +++ b/app/settings/widgets/patternwidget.cpp @@ -103,7 +103,6 @@ void PatternWidget::setTextColor(const QString &color) } m_textColor = color; - m_textColorBrightness = Latte::colorBrightness(QColor(color)); emit textColorChanged(); @@ -122,7 +121,7 @@ void PatternWidget::updateUi() background = "background-image: none;"; m_shadowEffect->setColor(Qt::transparent); } else { - m_shadowEffect->setColor(Qt::black); + m_shadowEffect->setColor("#020202"); } if (m_textColorBrightness > 127) { diff --git a/shell/package/contents/images/canvas/defaultcustomprint.jpg b/shell/package/contents/images/canvas/defaultcustomprint.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0f83b1d0cc233eee869c8111085dd0785a760558 GIT binary patch literal 46773 zcmeHQ2|SeB8$L7Eq6{gLkfjA>DQ))bu8NYSuI!;g2~ildNRcR)l7xyPd)!o(5?X9Y z_Ru1QjL4E@{^y%93x8YxyWny~3 z7yuL(d|AeLpN%a%Hh{;g58CcSjsxK_v$46M2|SL5$AUI+fbh5sX*VJsHzCJngkv;3 z1k5&?Tjb!}nBg&(**}hr{&8$n+0*Z}r{kHNJ)uxq6#p$SF50RXC(czhcl05oR-=sSbQ_k`l{ePIAl zQ~{7-HF&=DWdPQGhV5qt+jv6&U^ogua@Js*Q2+ob9ssbG?=!S9Bzz79{2#q*7XY6k z0GOo-tk14ddD#5o0u5uh1S6pSc*7GQ;|fOyg1gMyL@%z&@35Y8NI zhes$h4ZZ@~ zKbnsnGW^V!*2c=Z9&eA_eVKhGk>USm&)+a~@S|A8h_7cd#5Qn7)5iM>dDF(5_Pnon zXDWH#bx7On7|7cI4LO?hKm#V`l@ypcT#&nI;cF-=bVE>H>yeTg+l}>InIBqG7q>YX zd_Gt`$1zR#(4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