Toolbar icons that work in both light and dark modes.

https://bugs.torproject.org/31170#comment:8

I chose these icons for the "on" and "off" icons:
toolbar_icon_purple.svg → toolbar-on.svg
toolbar_icon_grey.svg → toolbar-off.svg

I then made toolbar-running.svg by copying toolbar-off.svg and changing
the stroke and fill from #4A4A4F to #40E0D0.
This commit is contained in:
David Fifield 2019-08-06 23:13:56 -06:00
parent 36815bd57b
commit 6ab50e32b9
11 changed files with 56 additions and 5 deletions

View file

@ -78,13 +78,15 @@ class WebExtUI extends UI {
if (this.active) { if (this.active) {
return chrome.browserAction.setIcon({ return chrome.browserAction.setIcon({
path: { path: {
32: "assets/status-running.png" 48: "assets/toolbar-running-48.png",
96: "assets/toolbar-running-96.png"
} }
}); });
} else { } else {
return chrome.browserAction.setIcon({ return chrome.browserAction.setIcon({
path: { path: {
32: "assets/status-on.png" 48: "assets/toolbar-on-48.png",
96: "assets/toolbar-on-96.png"
} }
}); });
} }
@ -94,7 +96,8 @@ class WebExtUI extends UI {
update(); update();
return chrome.browserAction.setIcon({ return chrome.browserAction.setIcon({
path: { path: {
32: "assets/status-" + (enabled ? "on" : "off") + ".png" 48: "assets/toolbar-" + (enabled ? "on" : "off") + "-48.png",
96: "assets/toolbar-" + (enabled ? "on" : "off") + "-96.png"
} }
}); });
} }
@ -142,7 +145,12 @@ var debug, snowflake, config, broker, ui, log, dbg, init, update, silenceNotific
missingFeature: true missingFeature: true
}); });
}); });
chrome.browserAction.setIcon({ path: { 32: "assets/status-off.png" } }); chrome.browserAction.setIcon({
path: {
48: "assets/toolbar-off-48.png",
96: "assets/toolbar-off-96.png"
}
});
return; return;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.1 KiB

View file

@ -10,7 +10,8 @@
}, },
"browser_action": { "browser_action": {
"default_icon": { "default_icon": {
"32": "assets/status-on.png" "48": "assets/toolbar-on-48.png",
"96": "assets/toolbar-on-96.png"
}, },
"default_title": "Snowflake", "default_title": "Snowflake",
"default_popup": "embed.html" "default_popup": "embed.html"