kcms/colors: Fix un-setting accent color from wallpaper

Fix changes in 6e7a147e3, where the property `accentColorFromWallpaper`
would get set but not un-set from the UI.
wilder-5.26
Ismael Asensio 4 years ago
parent 09a5a7706e
commit b24b049cdf
  1. 1
      kcms/colors/colors.cpp
  2. 5
      kcms/colors/package/contents/ui/main.qml

@ -72,6 +72,7 @@ KCMColors::KCMColors(QObject *parent, const KPluginMetaData &data, const QVarian
});
connect(colorsSettings(), &ColorsSettings::accentColorChanged, this, &KCMColors::accentColorChanged);
connect(colorsSettings(), &ColorsSettings::accentColorFromWallpaperChanged, this, &KCMColors::accentColorFromWallpaperChanged);
connect(m_model, &ColorsModel::selectedSchemeChanged, m_filteredModel, &FilterProxyModel::setSelectedScheme);
m_filteredModel->setSourceModel(m_model);

@ -146,6 +146,7 @@ KCM.GridViewKCM {
onToggled: {
if (checked) {
kcm.accentColorFromWallpaper = false;
kcm.accentColor = "transparent"
}
}
@ -171,6 +172,7 @@ KCM.GridViewKCM {
onToggled: {
if (checked) {
kcm.accentColorFromWallpaper = false;
kcm.accentColor = colorRepeater.model[0]
}
}
@ -237,9 +239,10 @@ KCM.GridViewKCM {
checked: Qt.colorEqual(kcm.accentColor, modelData)
onToggled: {
kcm.accentColorFromWallpaper = false;
kcm.accentColor = modelData
checked = Qt.binding(() => Qt.colorEqual(kcm.accentColor, modelData));
}
}
}
}

Loading…
Cancel
Save