Add option in setting to change all icons on panel to grayscale... no need for custom icons.

This commit is contained in:
JimBroad
2025-01-17 20:18:46 +00:00
parent d60439d981
commit e6e8d51f2c
3 changed files with 11 additions and 1 deletions

View File

@@ -65,7 +65,8 @@ export const DEFAULT_PADDING_SIZE = 4;
let APPICON_STYLE = {
NORMAL: "NORMAL",
SYMBOLIC: "SYMBOLIC"
SYMBOLIC: "SYMBOLIC",
GRAYSCALE: "GRAYSCALE"
}
let DOT_STYLE = {
@@ -638,6 +639,13 @@ export const TaskbarAppIcon = GObject.registerClass({
this.add_style_class_name(symbolic_icon_style_name);
} else {
this.remove_style_class_name(symbolic_icon_style_name);
if (SETTINGS.get_string('appicon-style') === APPICON_STYLE.GRAYSCALE) {
let desaturationValue = 1.0
let sat_effect = new Clutter.DesaturateEffect({factor : desaturationValue});
sat_effect.set_factor(desaturationValue);
this.add_effect_with_name('desaturate', sat_effect);
}
}
}