mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-15 00:34:05 +09:00
Add setting for changing app icon style to symbolic
This commit is contained in:
15
appIcons.js
15
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();
|
||||
|
||||
Reference in New Issue
Block a user