mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Simplify appicon-style assignment
This commit is contained in:
16
appIcons.js
16
appIcons.js
@@ -649,18 +649,12 @@ export const TaskbarAppIcon = GObject.registerClass({
|
||||
}
|
||||
|
||||
_setAppIconStyle() {
|
||||
let symbolic_icon_style_name = 'symbolic-icon-style';
|
||||
if (SETTINGS.get_string('appicon-style') === APPICON_STYLE.SYMBOLIC) {
|
||||
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._iconContainer.add_effect_with_name('desaturate', sat_effect);
|
||||
}
|
||||
let appIconStyle = SETTINGS.get_string('appicon-style');
|
||||
|
||||
if (appIconStyle === APPICON_STYLE.SYMBOLIC) {
|
||||
this.add_style_class_name('symbolic-icon-style');
|
||||
} else if (appIconStyle === APPICON_STYLE.GRAYSCALE) {
|
||||
this._iconContainer.add_effect_with_name('desaturate', new Clutter.DesaturateEffect({ factor: 1 }));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user