diff --git a/app/package/lattepackage.cpp b/app/package/lattepackage.cpp index a2521f382..eabc9522e 100644 --- a/app/package/lattepackage.cpp +++ b/app/package/lattepackage.cpp @@ -64,8 +64,6 @@ void Package::initPackage(KPackage::Package *package) package->addFileDefinition("preset4", QStringLiteral("presets/Extended.layout.latte"), i18n("extended preset file")); package->addFileDefinition("preset10", QStringLiteral("presets/multiple-layouts_hidden.layout.latte"), i18n("multiple layouts hidden file")); - package->addFileDefinition("themesExtendedInfo", QStringLiteral("themes/themesExtendedInforc"), i18n("a file that contains extended information for plasma themes")); - package->addFileDefinition("backgroundTracer", QStringLiteral("scripting/BackgroundTracer.qml"), i18n("a qml file that is used to publish broadcasted backgrounds")); package->setFallbackPackage(fallback); diff --git a/app/plasma/extended/theme.cpp b/app/plasma/extended/theme.cpp index 56f0f75e4..3ecb6a6d1 100644 --- a/app/plasma/extended/theme.cpp +++ b/app/plasma/extended/theme.cpp @@ -52,9 +52,6 @@ Theme::Theme(KSharedConfig::Ptr config, QObject *parent) : loadConfig(); connect(this, &Theme::outlineWidthChanged, this, &Theme::saveConfig); - connect(this, &Theme::userSetRoundnessChanged, this, &Theme::saveConfig); - - connect(this, &Theme::userSetRoundnessChanged, this, &Theme::roundnessChanged); connect(&m_theme, &Plasma::Theme::themeChanged, this, &Theme::hasShadowChanged); connect(&m_theme, &Plasma::Theme::themeChanged, this, &Theme::load); @@ -64,8 +61,7 @@ Theme::Theme(KSharedConfig::Ptr config, QObject *parent) : void Theme::load() { loadThemePaths(); - // loadRoundness(); - loadRoundnessFromSvgs(); + loadRoundness(); } Theme::~Theme() @@ -91,11 +87,6 @@ bool Theme::isDarkTheme() const return !m_isLightTheme; } -bool Theme::themeHasExtendedInfo() const -{ - return m_themeHasExtendedInfo; -} - int Theme::bottomEdgeRoundness() const { return m_bottomEdgeRoundness; @@ -131,22 +122,6 @@ void Theme::setOutlineWidth(int width) emit outlineWidthChanged(); } -int Theme::userThemeRoundness() const -{ - return m_userRoundness; -} - -void Theme::setUserThemeRoundness(int roundness) -{ - if (m_userRoundness == roundness) { - return; - } - - m_userRoundness = roundness; - - emit userSetRoundnessChanged(); -} - float Theme::backgroundMaxOpacity() const { return m_backgroundMaxOpacity; @@ -343,7 +318,7 @@ int Theme::roundness(Plasma::FrameSvg *svg, Plasma::Types::Location edge) return round; } -void Theme::loadRoundnessFromSvgs() +void Theme::loadRoundness() { Plasma::FrameSvg *svg = new Plasma::FrameSvg(this); svg->setImagePath(QStringLiteral("widgets/panel-background")); @@ -391,6 +366,8 @@ void Theme::loadRoundnessFromSvgs() emit roundnessChanged(); } +/*DEPRECATED CAN BE REMOVED*/ +/* void Theme::loadRoundness() { if (!m_corona) { @@ -432,6 +409,7 @@ void Theme::loadRoundness() emit roundnessChanged(); } +*/ void Theme::loadThemePaths() { @@ -610,13 +588,11 @@ void Theme::loadThemeLightness() void Theme::loadConfig() { - setUserThemeRoundness(m_themeGroup.readEntry("userSetPlasmaThemeRoundness", -1)); setOutlineWidth(m_themeGroup.readEntry("outlineWidth", 1)); } void Theme::saveConfig() { - m_themeGroup.writeEntry("userSetPlasmaThemeRoundness", m_userRoundness); m_themeGroup.writeEntry("outlineWidth", m_outlineWidth); m_themeGroup.sync(); diff --git a/app/plasma/extended/theme.h b/app/plasma/extended/theme.h index e06c58a2d..1dfe01c0b 100644 --- a/app/plasma/extended/theme.h +++ b/app/plasma/extended/theme.h @@ -82,9 +82,6 @@ public: int outlineWidth() const; void setOutlineWidth(int width); - int userThemeRoundness() const; - void setUserThemeRoundness(int roundness); - float backgroundMaxOpacity() const; SchemeColors *defaultTheme() const; @@ -99,7 +96,6 @@ signals: void outlineWidthChanged(); void roundnessChanged(); void themeChanged(); - void userSetRoundnessChanged(); private slots: void loadConfig(); @@ -109,7 +105,6 @@ private slots: private: void loadThemePaths(); void loadRoundness(); - void loadRoundnessFromSvgs(); void setOriginalSchemeFile(const QString &file); void parseThemeSvgFiles(); @@ -118,19 +113,15 @@ private: void updateReversedScheme(); void updateReversedSchemeValues(); - bool themeHasExtendedInfo() const; - int roundness(Plasma::FrameSvg *svg, Plasma::Types::Location edge); private: bool m_isLightTheme{false}; - bool m_themeHasExtendedInfo{false}; int m_bottomEdgeRoundness{0}; int m_leftEdgeRoundness{0}; int m_topEdgeRoundness{0}; int m_rightEdgeRoundness{0}; int m_outlineWidth{1}; - int m_userRoundness{-1}; float m_backgroundMaxOpacity{1}; diff --git a/app/settings/settingsdialog.cpp b/app/settings/settingsdialog.cpp index 8530a52f8..bb0c5d050 100644 --- a/app/settings/settingsdialog.cpp +++ b/app/settings/settingsdialog.cpp @@ -70,7 +70,6 @@ const int BORDERSCOLUMN = 5; const int ACTIVITYCOLUMN = 6; const int SCREENTRACKERDEFAULTVALUE = 2500; -const int THEMEDEFAULTROUNDNESS = 0; //Breeze default value is used 0px. const int OUTLINEDEFAULTWIDTH = 1; const QChar CheckMark{0x2714}; @@ -137,8 +136,6 @@ SettingsDialog::SettingsDialog(QWidget *parent, Latte::Corona *corona) m_mouseSensitivityButtons->setExclusive(true); ui->screenTrackerSpinBox->setValue(m_corona->universalSettings()->screenTrackerInterval()); - ui->themeRoundnessSpinBox->setSpecialValueText(i18nc("automatic background roundness","Automatic")); - ui->themeRoundnessSpinBox->setValue(m_corona->themeExtended()->userThemeRoundness()); ui->outlineSpinBox->setValue(m_corona->themeExtended()->outlineWidth()); //! About Menu @@ -193,10 +190,6 @@ SettingsDialog::SettingsDialog(QWidget *parent, Latte::Corona *corona) updateApplyButtonsState(); }); - connect(ui->themeRoundnessSpinBox, QOverload::of(&QSpinBox::valueChanged), [ = ](int i) { - updateApplyButtonsState(); - }); - connect(ui->outlineSpinBox, QOverload::of(&QSpinBox::valueChanged), [ = ](int i) { updateApplyButtonsState(); }); @@ -765,7 +758,6 @@ void SettingsDialog::restoreDefaults() ui->noBordersForMaximizedChkBox->setChecked(false); ui->highSensitivityBtn->setChecked(true); ui->screenTrackerSpinBox->setValue(SCREENTRACKERDEFAULTVALUE); - ui->themeRoundnessSpinBox->setValue(THEMEDEFAULTROUNDNESS); ui->outlineSpinBox->setValue(OUTLINEDEFAULTWIDTH); } } @@ -968,7 +960,6 @@ QList SettingsDialog::currentSettings() settings << (int)ui->noBordersForMaximizedChkBox->isChecked(); settings << m_mouseSensitivityButtons->checkedId(); settings << ui->screenTrackerSpinBox->value(); - settings << ui->themeRoundnessSpinBox->value(); settings << ui->outlineSpinBox->value(); settings << m_model->rowCount(); @@ -1226,7 +1217,6 @@ void SettingsDialog::updateApplyButtonsState() || ui->noBordersForMaximizedChkBox->isChecked() || !ui->highSensitivityBtn->isChecked() || ui->screenTrackerSpinBox->value() != SCREENTRACKERDEFAULTVALUE - || ui->themeRoundnessSpinBox->value() != THEMEDEFAULTROUNDNESS || ui->outlineSpinBox->value() != OUTLINEDEFAULTWIDTH ) { ui->buttonBox->button(QDialogButtonBox::RestoreDefaults)->setEnabled(true); } else { @@ -1360,7 +1350,6 @@ bool SettingsDialog::saveAllChanges() m_corona->universalSettings()->setCanDisableBorders(noBordersForMaximized); m_corona->universalSettings()->setScreenTrackerInterval(ui->screenTrackerSpinBox->value()); - m_corona->themeExtended()->setUserThemeRoundness(ui->themeRoundnessSpinBox->value()); m_corona->themeExtended()->setOutlineWidth(ui->outlineSpinBox->value()); //! Update Layouts diff --git a/app/settings/settingsdialog.ui b/app/settings/settingsdialog.ui index c5ab0e9f5..eaa2a639d 100644 --- a/app/settings/settingsdialog.ui +++ b/app/settings/settingsdialog.ui @@ -444,8 +444,8 @@ 0 0 - 885 - 613 + 894 + 594 @@ -984,84 +984,6 @@ This tracker is used in order to not lose any screen related update. - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - Roundness used from Latte elements in order to feel part of the current plasma theme - - - Background roundness - - - - - - - - 0 - 0 - - - - - 200 - 16777215 - - - - Roundness used from Latte elements in order to feel part of the current plasma theme -when there are no other roundness information. - - - - - - px. - - - -1 - - - 32 - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - diff --git a/shell/package/contents/themes/themesExtendedInforc b/shell/package/contents/themes/themesExtendedInforc deleted file mode 100644 index 46d319a8a..000000000 --- a/shell/package/contents/themes/themesExtendedInforc +++ /dev/null @@ -1,9 +0,0 @@ -[Roundness] -Breeze=0 -Air=3 -Oxygen=6 -Arc=4 -Materia=4 -Adapta=4 -Elegant=3 -UnityAmbiance=0