GithubHelp home page GithubHelp logo

Comments (15)

Henry47a avatar Henry47a commented on August 30, 2024 1

Since my favorite theme Dark Fox No Logo got an update yesterday, the undoclosetab icon is no longer displayed correctly.

I made some tests with the theme on Windows 7 and Firefox 66.0.5 (64-bit)

With theme version 2.0 and undoclosetab 4.4.3 only a black arrow is displayed.
With theme version 1.0 and undoclosetab 4.4.3 the icon is displayed correctly.
With theme version 2.0 and undoclosetab 4.1.3 the icon is also displayed correctly.

from undoclosetab.

M-Reimer avatar M-Reimer commented on August 30, 2024

Removing transparency is only one issue.
The major problem is that I don't get notified about the theme change at all.
--> Upstream bug
https://bugzilla.mozilla.org/show_bug.cgi?id=1494620

Edit: New upstream bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1492145

from undoclosetab.

rugk avatar rugk commented on August 30, 2024

Hmm… why do you even manually handle theme changes?

These two lines should do it all, AFAIK:
https://github.com/M-Reimer/undoclosetab/blob/master/manifest.json#L29-L30

Firefox automatically determines whether the theme is black or white and switches to the appropriate icon. (unless you overwrite that via JS, of course) BTW, also why 19px?? 😮

from undoclosetab.

M-Reimer avatar M-Reimer commented on August 30, 2024

These lines don't help that much.
IMHO the whole idea behind this "black and white" thing is obsolete since https://color.firefox.com/
My current "recolor" code works well with "Firefox Color" but fails with so-called "lightweight themes"
Even without my "recolor" code you'll find themes on AMO where the icon is not visible as the coloring doesn't fit.

I use 19px as this was taken from the Firefox sourcecode at some time.
The size doesn't matter anyway as Firefox renders dynamically from SVG.

Currently Mozilla makes it really difficult for developers to create toolbar icons that fit well with the existing ones... 😢

from undoclosetab.

rugk avatar rugk commented on August 30, 2024

Well… if the correct color is not correctly detected then this is an issue of Firefox.
But you well likely always have themes that may have a light "edge" where your icon symbol is and are otherwise pretty dark. I see nothing you can do here, as an add-on author.

from undoclosetab.

rugk avatar rugk commented on August 30, 2024

A thing like https://discourse.mozilla.org/t/use-theme-colors-for-svg-favicons/29165 would likely fix the problem properly…

from undoclosetab.

M-Reimer avatar M-Reimer commented on August 30, 2024

https://bugzilla.mozilla.org/show_bug.cgi?id=1492145 has been accepted.
I really hope they'll also cover "static themes" with their fix.

from undoclosetab.

geniuszxy avatar geniuszxy commented on August 30, 2024

@M-Reimer a part of the icon disappears since upgrade Firefox to 65.0 if I use a custom theme.
q1
ThemeUpdated is invoked, but the output seems lost some data.
.

from undoclosetab.

M-Reimer avatar M-Reimer commented on August 30, 2024

Interesting. Please also add a link to the theme (addons.mozilla.org link).

from undoclosetab.

M-Reimer avatar M-Reimer commented on August 30, 2024

Did a short test with "Firefox Color" (my common testcase for dynamic themes) and it works there.
I really need the theme and maybe this is a "Windows only" problem which I couldn't debug at all...

from undoclosetab.

geniuszxy avatar geniuszxy commented on August 30, 2024

@M-Reimer , the icon works well with Firefox Color, my problem is occured with other static themes download from addons site, such as this one: https://addons.mozilla.org/en-US/firefox/addon/modern-sunstet-v2/?src=search

from undoclosetab.

M-Reimer avatar M-Reimer commented on August 30, 2024

Fixed:
140187a

from undoclosetab.

M-Reimer avatar M-Reimer commented on August 30, 2024

Thanks for reporting. This is another missing color name which has to be checked on theme update. Fixed by d806125
Will be part of the next release.

from undoclosetab.

M-Reimer avatar M-Reimer commented on August 30, 2024

I've published 4.4.4 with another fix. In this case I not only added all possible color names that seem to influence the icon color but I also added a fallback to not re-render the icon if no usable color at all can be found in the used theme.

If there are other themes with problems, then please open a new Issue and add a link to the problematic theme.

from undoclosetab.

M-Reimer avatar M-Reimer commented on August 30, 2024

I've published 4.4.4 with another fix. In this case I not only added all possible color names that seem to influence the icon color but I also added a fallback to not re-render the icon if no usable color at all can be found in the used theme.

If there are other themes with problems, then please open a new Issue and add a link to the problematic theme.

from undoclosetab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.