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) {
return chrome.browserAction.setIcon({
path: {
32: "assets/status-running.png"
48: "assets/toolbar-running-48.png",
96: "assets/toolbar-running-96.png"
}
});
} else {
return chrome.browserAction.setIcon({
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();
return chrome.browserAction.setIcon({
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
});
});
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;
}