diff --git a/appIcons.js b/appIcons.js index 73c1650..605033d 100644 --- a/appIcons.js +++ b/appIcons.js @@ -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(); diff --git a/prefs.js b/prefs.js index d85d3d4..f3cee91 100644 --- a/prefs.js +++ b/prefs.js @@ -702,6 +702,12 @@ const Preferences = class { panel_size_scale.set_inverted(true); } + // App icon style option + this._builder.get_object('appicon_style_combo').set_active_id(this._settings.get_string('appicon-style')); + this._builder.get_object('appicon_style_combo').connect('changed', (widget) => { + this._settings.set_string('appicon-style', widget.get_active_id()); + }); + // Dots Position option let dotPosition = this._settings.get_string('dot-position'); diff --git a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml index 9e9fb6f..a73a349 100644 --- a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml +++ b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml @@ -1,5 +1,9 @@ + + + + @@ -119,6 +123,11 @@ Dot position Running indicators are shown on the Bottom or Top of the screen. + + 'NORMAL' + Style of Appicons + Style of Appicons + 'METRO' Style of the running indicator (focused) diff --git a/stylesheet.css b/stylesheet.css index eed1da3..000aceb 100644 --- a/stylesheet.css +++ b/stylesheet.css @@ -143,3 +143,7 @@ -progress-bar-border: rgba(0.9, 0.9, 0.9, 1); */ } + +.symbolic-icon-style { + -st-icon-style: symbolic; +} diff --git a/taskbar.js b/taskbar.js index 8b599bd..1866b23 100644 --- a/taskbar.js +++ b/taskbar.js @@ -378,6 +378,7 @@ export const Taskbar = class extends EventEmitter { [ SETTINGS, [ + 'changed::appicon-style', 'changed::group-apps-use-launchers', 'changed::taskbar-locked' ], diff --git a/ui/SettingsStyle.ui b/ui/SettingsStyle.ui index 4fce374..abe5c34 100644 --- a/ui/SettingsStyle.ui +++ b/ui/SettingsStyle.ui @@ -104,6 +104,20 @@ + + + Icon style + + + center + + Normal + Symbolic + + + + +