Closed Bug 1431938 Opened 7 years ago Closed 7 years ago

browser_action "theme_icons" reversed.

Categories

(WebExtensions :: Untriaged, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: MarkBauer, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0 Build ID: 20180115100056 Steps to reproduce: Set up a browser action with the following content: "browser_action": { "browser_style": true, "theme_icons": [{ "light": "icons/battery-light.png", "dark": "icons/battery.png", "size": 16 }], "default_popup": "popup.html" } Where "battery-light.png" is a black icon on transparent background and "battery.png" a white icon on transparent background. Actual results: When I switch to a dark theme, "battery-light.png" is being displayed. Conversely, "battery.png" is displayed whenever I switch to a light icon. Expected results: When I switched to a dark theme, "battery.png" should've been displayed. "battery-light.png" should've been displayed when I switched back to a light theme.
I also tried using a completely different icon for the dark theme, just to confirm this isn't just an issue with the transparency. Sure enough, the different icon would then be applied to the light theme instead. Related: Bug 1404568
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit
Flags: needinfo?(amckay)
When I use the example, beastify here: https://github.com/mdn/webextensions-examples/blob/master/beastify/manifest.json The icon specified as light: "icons/beasts-32-light.png", is shown when the theme is made dark. When I set the theme to light, the dark icon is shown. This matches the documentation: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/browser_action "A URL pointing to an icon. This icon will be selected when themes with dark text are active (e.g. Firefox's Light theme, and the Default theme if no default_icon is specified)." So a light theme shows the icon specified as dark, not the other way around.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(amckay)
Resolution: --- → WORKSFORME
Thanks. I missed that part of the documentation. Didn't realise the "light/dark" differentiation was based on the text color rather than the theme orientation.
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.