Commit f4774d82 authored by Tanbir Jishan's avatar Tanbir Jishan
Browse files

Add an option to apply accent color from wallpaper

parent 1b7ece48
Pipeline #116126 failed with stage
in 1 minute and 37 seconds
......@@ -23,10 +23,16 @@ AbstractKCM {
property string currentWallpaper: ""
property string containmentPlugin: ""
property bool shouldResetAccentInfo: false
property bool pluginChanged: false
title: i18n("Appearance")
function saveConfig() {
if(pluginChanged){
pluginChanged=false;
executable.resetAccentSupportInfo();
}
if (main.currentItem.saveConfig) {
main.currentItem.saveConfig()
}
......@@ -86,7 +92,7 @@ AbstractKCM {
onNewData: disconnectSource(sourceName)
function resetAccentSupportInfo() {
var cmd = 'qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.activateLauncherMenu'
var cmd = 'qdbus org.kde.plasmashell.wallpaperPlugin.accentColor /AccentColorService org.kde.plasmashell.wallpaperPlugin.resetAccentColorSupportStatus'
executable.connectSource(cmd)
}
}
......@@ -102,7 +108,6 @@ AbstractKCM {
onActivated: {
var model = configDialog.containmentPluginsConfigModel.get(currentIndex)
root.containmentPlugin = model.pluginName
shouldResetAccentInfo ? executable.resetAccentSupportInfo() : shouldResetAccentInfo = !shouldResetAccentInfo // So that it doesn't get triggered on start up
root.settingValueChanged()
}
}
......@@ -122,6 +127,7 @@ AbstractKCM {
root.currentWallpaper = model.pluginName
configDialog.currentWallpaper = model.pluginName
main.sourceFile = model.source
shouldResetAccentInfo ? pluginChanged = true : shouldResetAccentInfo = !shouldResetAccentInfo // So that it doesn't get toggled on start up
root.settingValueChanged()
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment