Add setting for changing app icon style to symbolic

This commit is contained in:
Maxim Shpak
2024-02-17 18:09:44 +03:00
parent 42eba9b119
commit cccbdcdaa2
6 changed files with 49 additions and 0 deletions

View File

@@ -63,6 +63,11 @@ let LABEL_GAP = 5;
let MAX_INDICATORS = 4;
export const DEFAULT_PADDING_SIZE = 4;
let APPICON_STYLE = {
NORMAL: "NORMAL",
SYMBOLIC: "SYMBOLIC"
}
let DOT_STYLE = {
DOTS: "DOTS",
SQUARES: "SQUARES",
@@ -188,6 +193,7 @@ export const TaskbarAppIcon = GObject.registerClass({
this._onAnimateAppiconHoverChanged();
this._setAppIconPadding();
this._setAppIconStyle();
this._showDots();
this._focusWindowChangedId = global.display.connect('notify::focus-window',
@@ -626,6 +632,15 @@ export const TaskbarAppIcon = GObject.registerClass({
this._iconContainer.set_style('padding: ' + padding + 'px;');
}
_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);
}
}
popupMenu() {
this._removeMenuTimeout();
this.fake_release();