mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +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;
|
let MAX_INDICATORS = 4;
|
||||||
export const DEFAULT_PADDING_SIZE = 4;
|
export const DEFAULT_PADDING_SIZE = 4;
|
||||||
|
|
||||||
|
let APPICON_STYLE = {
|
||||||
|
NORMAL: "NORMAL",
|
||||||
|
SYMBOLIC: "SYMBOLIC"
|
||||||
|
}
|
||||||
|
|
||||||
let DOT_STYLE = {
|
let DOT_STYLE = {
|
||||||
DOTS: "DOTS",
|
DOTS: "DOTS",
|
||||||
SQUARES: "SQUARES",
|
SQUARES: "SQUARES",
|
||||||
@@ -188,6 +193,7 @@ export const TaskbarAppIcon = GObject.registerClass({
|
|||||||
|
|
||||||
this._onAnimateAppiconHoverChanged();
|
this._onAnimateAppiconHoverChanged();
|
||||||
this._setAppIconPadding();
|
this._setAppIconPadding();
|
||||||
|
this._setAppIconStyle();
|
||||||
this._showDots();
|
this._showDots();
|
||||||
|
|
||||||
this._focusWindowChangedId = global.display.connect('notify::focus-window',
|
this._focusWindowChangedId = global.display.connect('notify::focus-window',
|
||||||
@@ -626,6 +632,15 @@ export const TaskbarAppIcon = GObject.registerClass({
|
|||||||
this._iconContainer.set_style('padding: ' + padding + 'px;');
|
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() {
|
popupMenu() {
|
||||||
this._removeMenuTimeout();
|
this._removeMenuTimeout();
|
||||||
this.fake_release();
|
this.fake_release();
|
||||||
|
|||||||
6
prefs.js
6
prefs.js
@@ -702,6 +702,12 @@ const Preferences = class {
|
|||||||
panel_size_scale.set_inverted(true);
|
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
|
// Dots Position option
|
||||||
let dotPosition = this._settings.get_string('dot-position');
|
let dotPosition = this._settings.get_string('dot-position');
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<schemalist gettext-domain="gnome-shell-extensions">
|
<schemalist gettext-domain="gnome-shell-extensions">
|
||||||
|
<enum id='org.gnome.shell.extensions.dash-to-panel.appiconStyle'>
|
||||||
|
<value value='0' nick='NORMAL'/>
|
||||||
|
<value value='1' nick='SYMBOLIC'/>
|
||||||
|
</enum>
|
||||||
<enum id='org.gnome.shell.extensions.dash-to-panel.dotStyle'>
|
<enum id='org.gnome.shell.extensions.dash-to-panel.dotStyle'>
|
||||||
<value value='0' nick='DOTS'/>
|
<value value='0' nick='DOTS'/>
|
||||||
<value value='1' nick='SQUARES'/>
|
<value value='1' nick='SQUARES'/>
|
||||||
@@ -119,6 +123,11 @@
|
|||||||
<summary>Dot position</summary>
|
<summary>Dot position</summary>
|
||||||
<description>Running indicators are shown on the Bottom or Top of the screen.</description>
|
<description>Running indicators are shown on the Bottom or Top of the screen.</description>
|
||||||
</key>
|
</key>
|
||||||
|
<key name="appicon-style" enum="org.gnome.shell.extensions.dash-to-panel.appiconStyle">
|
||||||
|
<default>'NORMAL'</default>
|
||||||
|
<summary>Style of Appicons</summary>
|
||||||
|
<description>Style of Appicons</description>
|
||||||
|
</key>
|
||||||
<key name="dot-style-focused" enum="org.gnome.shell.extensions.dash-to-panel.dotStyle">
|
<key name="dot-style-focused" enum="org.gnome.shell.extensions.dash-to-panel.dotStyle">
|
||||||
<default>'METRO'</default>
|
<default>'METRO'</default>
|
||||||
<summary>Style of the running indicator (focused)</summary>
|
<summary>Style of the running indicator (focused)</summary>
|
||||||
|
|||||||
@@ -154,3 +154,7 @@
|
|||||||
-progress-bar-border: rgba(0.9, 0.9, 0.9, 1);
|
-progress-bar-border: rgba(0.9, 0.9, 0.9, 1);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.symbolic-icon-style {
|
||||||
|
-st-icon-style: symbolic;
|
||||||
|
}
|
||||||
|
|||||||
@@ -378,6 +378,7 @@ export const Taskbar = class extends EventEmitter {
|
|||||||
[
|
[
|
||||||
SETTINGS,
|
SETTINGS,
|
||||||
[
|
[
|
||||||
|
'changed::appicon-style',
|
||||||
'changed::group-apps-use-launchers',
|
'changed::group-apps-use-launchers',
|
||||||
'changed::taskbar-locked'
|
'changed::taskbar-locked'
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -104,6 +104,20 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<object class="AdwActionRow">
|
||||||
|
<property name="title" translatable="yes">Icon style</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBoxText" id="appicon_style_combo">
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<items>
|
||||||
|
<item id="NORMAL" translatable="yes">Normal</item>
|
||||||
|
<item id="SYMBOLIC" translatable="yes">Symbolic</item>
|
||||||
|
</items>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user