mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-15 00:34:05 +09:00
rename indicator style and images
This commit is contained in:
2
Makefile
2
Makefile
@@ -3,7 +3,7 @@
|
|||||||
UUID = dash-to-panel@jderose9.github.com
|
UUID = dash-to-panel@jderose9.github.com
|
||||||
BASE_MODULES = extension.js stylesheet.css metadata.json COPYING README.md
|
BASE_MODULES = extension.js stylesheet.css metadata.json COPYING README.md
|
||||||
EXTRA_MODULES = convenience.js panel.js panelStyle.js overview.js taskbar.js secondaryMenu.js windowPreview.js prefs.js Settings.ui
|
EXTRA_MODULES = convenience.js panel.js panelStyle.js overview.js taskbar.js secondaryMenu.js windowPreview.js prefs.js Settings.ui
|
||||||
EXTRA_IMAGES = focused_multi_bg.svg focused_single_bg.svg
|
EXTRA_IMAGES = highlight_bg.svg highlight_stacked_bg.svg
|
||||||
TOLOCALIZE = prefs.js
|
TOLOCALIZE = prefs.js
|
||||||
MSGSRC = $(wildcard po/*.po)
|
MSGSRC = $(wildcard po/*.po)
|
||||||
ifeq ($(strip $(DESTDIR)),)
|
ifeq ($(strip $(DESTDIR)),)
|
||||||
|
|||||||
@@ -1352,9 +1352,9 @@
|
|||||||
<item id="SQUARES" translatable="yes">Squares</item>
|
<item id="SQUARES" translatable="yes">Squares</item>
|
||||||
<item id="DASHES" translatable="yes">Dashes</item>
|
<item id="DASHES" translatable="yes">Dashes</item>
|
||||||
<item id="SEGMENTED" translatable="yes">Segmented</item>
|
<item id="SEGMENTED" translatable="yes">Segmented</item>
|
||||||
<item id="DOTTED" translatable="yes">Dotted</item>
|
|
||||||
<item id="METRO" translatable="yes">Metro</item>
|
|
||||||
<item id="SOLID" translatable="yes">Solid</item>
|
<item id="SOLID" translatable="yes">Solid</item>
|
||||||
|
<item id="CILIORA" translatable="yes">Ciliora</item>
|
||||||
|
<item id="METRO" translatable="yes">Metro</item>
|
||||||
</items>
|
</items>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@@ -1413,9 +1413,9 @@
|
|||||||
<item id="SQUARES" translatable="yes">Squares</item>
|
<item id="SQUARES" translatable="yes">Squares</item>
|
||||||
<item id="DASHES" translatable="yes">Dashes</item>
|
<item id="DASHES" translatable="yes">Dashes</item>
|
||||||
<item id="SEGMENTED" translatable="yes">Segmented</item>
|
<item id="SEGMENTED" translatable="yes">Segmented</item>
|
||||||
<item id="DOTTED" translatable="yes">Dotted</item>
|
|
||||||
<item id="METRO" translatable="yes">Metro</item>
|
|
||||||
<item id="SOLID" translatable="yes">Solid</item>
|
<item id="SOLID" translatable="yes">Solid</item>
|
||||||
|
<item id="CILIORA" translatable="yes">Ciliora</item>
|
||||||
|
<item id="METRO" translatable="yes">Metro</item>
|
||||||
</items>
|
</items>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
5
prefs.js
5
prefs.js
@@ -222,10 +222,6 @@ const Settings = new Lang.Class({
|
|||||||
this._builder.get_object('focus_highlight_switch'),
|
this._builder.get_object('focus_highlight_switch'),
|
||||||
'active',
|
'active',
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
Gio.SettingsBindFlags.DEFAULT);
|
||||||
this._settings.bind('dot-stacked',
|
|
||||||
this._builder.get_object('dot_stacked_switch'),
|
|
||||||
'active',
|
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
|
||||||
|
|
||||||
this._builder.get_object('dot_size_spinbutton').set_value(this._settings.get_int('dot-size'));
|
this._builder.get_object('dot_size_spinbutton').set_value(this._settings.get_int('dot-size'));
|
||||||
this._builder.get_object('dot_size_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
this._builder.get_object('dot_size_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
||||||
@@ -248,7 +244,6 @@ const Settings = new Lang.Class({
|
|||||||
this._builder.get_object('dot_size_spinbutton').set_value(this._settings.get_int('dot-size'));
|
this._builder.get_object('dot_size_spinbutton').set_value(this._settings.get_int('dot-size'));
|
||||||
|
|
||||||
this._settings.set_value('focus-highlight', this._settings.get_default_value('focus-highlight'));
|
this._settings.set_value('focus-highlight', this._settings.get_default_value('focus-highlight'));
|
||||||
this._settings.set_value('dot-stacked', this._settings.get_default_value('dot-stacked'));
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// remove the settings box so it doesn't get destroyed;
|
// remove the settings box so it doesn't get destroyed;
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
<value value='1' nick='SQUARES'/>
|
<value value='1' nick='SQUARES'/>
|
||||||
<value value='2' nick='DASHES'/>
|
<value value='2' nick='DASHES'/>
|
||||||
<value value='3' nick='SEGMENTED'/>
|
<value value='3' nick='SEGMENTED'/>
|
||||||
<value value='4' nick='DOTTED'/>
|
<value value='4' nick='SOLID'/>
|
||||||
<value value='5' nick='METRO'/>
|
<value value='5' nick='CILIORA'/>
|
||||||
<value value='6' nick='SOLID'/>
|
<value value='6' nick='METRO'/>
|
||||||
</enum>
|
</enum>
|
||||||
<enum id='org.gnome.shell.extensions.dash-to-panel.clickAction'>
|
<enum id='org.gnome.shell.extensions.dash-to-panel.clickAction'>
|
||||||
<value value='0' nick='SKIP'/>
|
<value value='0' nick='SKIP'/>
|
||||||
@@ -97,11 +97,6 @@
|
|||||||
<summary>Highlight icon of focused application</summary>
|
<summary>Highlight icon of focused application</summary>
|
||||||
<description>Whether to highlight the background of the currently focused application's icon</description>
|
<description>Whether to highlight the background of the currently focused application's icon</description>
|
||||||
</key>
|
</key>
|
||||||
<key type="b" name="dot-stacked">
|
|
||||||
<default>true</default>
|
|
||||||
<summary>Stacked appearance for indicator</summary>
|
|
||||||
<description>Whether to give a stacked appearance to indicator and highlight of applications with multiple windows open</description>
|
|
||||||
</key>
|
|
||||||
<key name="location-clock" enum="org.gnome.shell.extensions.dash-to-panel.statusAreaPosition">
|
<key name="location-clock" enum="org.gnome.shell.extensions.dash-to-panel.statusAreaPosition">
|
||||||
<default>'STATUSLEFT'</default>
|
<default>'STATUSLEFT'</default>
|
||||||
<summary>Location of the clock</summary>
|
<summary>Location of the clock</summary>
|
||||||
|
|||||||
29
taskbar.js
29
taskbar.js
@@ -61,11 +61,16 @@ let DOT_STYLE = {
|
|||||||
SQUARES: "SQUARES",
|
SQUARES: "SQUARES",
|
||||||
DASHES: "DASHES",
|
DASHES: "DASHES",
|
||||||
SEGMENTED: "SEGMENTED",
|
SEGMENTED: "SEGMENTED",
|
||||||
DOTTED: "DOTTED",
|
CILIORA: "CILIORA",
|
||||||
METRO: "METRO",
|
METRO: "METRO",
|
||||||
SOLID: "SOLID"
|
SOLID: "SOLID"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let DOT_POSITION = {
|
||||||
|
TOP: "TOP",
|
||||||
|
BOTTOM: "BOTTOM"
|
||||||
|
}
|
||||||
|
|
||||||
function getPosition() {
|
function getPosition() {
|
||||||
return Main.layoutManager.panelBox.anchor_y == 0 ? St.Side.TOP : St.Side.BOTTOM;
|
return Main.layoutManager.panelBox.anchor_y == 0 ? St.Side.TOP : St.Side.BOTTOM;
|
||||||
}
|
}
|
||||||
@@ -1266,7 +1271,6 @@ const taskbarAppIcon = new Lang.Class({
|
|||||||
this._dtpSettings.connect('changed::dot-color-3', Lang.bind(this, this._settingsChangeRefresh));
|
this._dtpSettings.connect('changed::dot-color-3', Lang.bind(this, this._settingsChangeRefresh));
|
||||||
this._dtpSettings.connect('changed::dot-color-4', Lang.bind(this, this._settingsChangeRefresh));
|
this._dtpSettings.connect('changed::dot-color-4', Lang.bind(this, this._settingsChangeRefresh));
|
||||||
this._dtpSettings.connect('changed::focus-highlight', Lang.bind(this, this._settingsChangeRefresh));
|
this._dtpSettings.connect('changed::focus-highlight', Lang.bind(this, this._settingsChangeRefresh));
|
||||||
this._dtpSettings.connect('changed::dot-stacked', Lang.bind(this, this._settingsChangeRefresh));
|
|
||||||
|
|
||||||
this._dtpSettings.connect('changed::appicon-margin', Lang.bind(this, this._setIconStyle));
|
this._dtpSettings.connect('changed::appicon-margin', Lang.bind(this, this._setIconStyle));
|
||||||
|
|
||||||
@@ -1392,14 +1396,19 @@ const taskbarAppIcon = new Lang.Class({
|
|||||||
|
|
||||||
if(this._dtpSettings.get_boolean('focus-highlight') && tracker.focus_app == this.app && !this._isThemeProvidingIndicator()) {
|
if(this._dtpSettings.get_boolean('focus-highlight') && tracker.focus_app == this.app && !this._isThemeProvidingIndicator()) {
|
||||||
let containerWidth = this._iconContainer.get_width();
|
let containerWidth = this._iconContainer.get_width();
|
||||||
|
let focusedDotStyle = this._dtpSettings.get_string('dot-style-focused');
|
||||||
|
let isWide = this._isWideDotStyle(focusedDotStyle);
|
||||||
|
let pos = this._dtpSettings.get_string('dot-position');
|
||||||
|
let size = this._dtpSettings.get_int('dot-size');
|
||||||
|
|
||||||
inlineStyle += "background-image: url('" +
|
inlineStyle += "background-image: url('" +
|
||||||
Me.path + "/img/focused_" +
|
Me.path + "/img/highlight_" +
|
||||||
((this._nWindows > 1 && this._dtpSettings.get_boolean('dot-stacked')) ? "multi" : "single") +
|
((this._nWindows > 1 && focusedDotStyle == DOT_STYLE.METRO) ? "stacked_" : "") +
|
||||||
"_bg.svg'); background-position: 0 " +
|
"bg.svg'); background-position: 0 " +
|
||||||
((this._isWideDotStyle(this._dtpSettings.get_string('dot-style-focused')) && this._dtpSettings.get_string('dot-position') == "TOP") ? this._dtpSettings.get_int('dot-size') : 0) +
|
((isWide && pos == DOT_POSITION.TOP) ? size : 0) +
|
||||||
"px; background-size: " +
|
"px; background-size: " +
|
||||||
containerWidth + "px " +
|
containerWidth + "px " +
|
||||||
(containerWidth - ((this._isWideDotStyle(this._dtpSettings.get_string('dot-style-focused')) && this._dtpSettings.get_string('dot-position') == "BOTTOM") ? this._dtpSettings.get_int('dot-size') : this._dtpSettings.get_int('dot-size'))) + "px;"
|
(containerWidth - ((isWide && pos == DOT_POSITION.BOTTOM) ? size : 0)) + "px;";
|
||||||
}
|
}
|
||||||
|
|
||||||
// graphical glitches if i dont set this on a timeout
|
// graphical glitches if i dont set this on a timeout
|
||||||
@@ -1519,7 +1528,7 @@ const taskbarAppIcon = new Lang.Class({
|
|||||||
|
|
||||||
_isWideDotStyle: function(dotStyle) {
|
_isWideDotStyle: function(dotStyle) {
|
||||||
return dotStyle == DOT_STYLE.SEGMENTED ||
|
return dotStyle == DOT_STYLE.SEGMENTED ||
|
||||||
dotStyle == DOT_STYLE.DOTTED ||
|
dotStyle == DOT_STYLE.CILIORA ||
|
||||||
dotStyle == DOT_STYLE.METRO ||
|
dotStyle == DOT_STYLE.METRO ||
|
||||||
dotStyle == DOT_STYLE.SOLID;
|
dotStyle == DOT_STYLE.SOLID;
|
||||||
},
|
},
|
||||||
@@ -1675,7 +1684,7 @@ const taskbarAppIcon = new Lang.Class({
|
|||||||
let n = this._nWindows;
|
let n = this._nWindows;
|
||||||
let size = this._dtpSettings.get_int('dot-size');
|
let size = this._dtpSettings.get_int('dot-size');
|
||||||
let padding = 0; // distance from the margin
|
let padding = 0; // distance from the margin
|
||||||
let yOffset = this._dtpSettings.get_string('dot-position') == "TOP" ? 0 : (height - padding - size);
|
let yOffset = this._dtpSettings.get_string('dot-position') == DOT_POSITION.TOP ? 0 : (height - padding - size);
|
||||||
|
|
||||||
if(type == DOT_STYLE.DOTS) {
|
if(type == DOT_STYLE.DOTS) {
|
||||||
// Draw the required numbers of dots
|
// Draw the required numbers of dots
|
||||||
@@ -1725,7 +1734,7 @@ const taskbarAppIcon = new Lang.Class({
|
|||||||
cr.rectangle(i*dashLength + i*spacing, 0, dashLength, size);
|
cr.rectangle(i*dashLength + i*spacing, 0, dashLength, size);
|
||||||
}
|
}
|
||||||
cr.fill();
|
cr.fill();
|
||||||
} else if (type == DOT_STYLE.DOTTED) {
|
} else if (type == DOT_STYLE.CILIORA) {
|
||||||
let spacing = size; // separation between the dots
|
let spacing = size; // separation between the dots
|
||||||
let lineLength = width - (size*(n-1)) - (spacing*(n-1));
|
let lineLength = width - (size*(n-1)) - (spacing*(n-1));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user