Frewacom / pywalfox

Dynamic theming of Firefox (and Thunderbird) using your Pywal colors
https://addons.mozilla.org/en-US/firefox/addon/pywalfox/
Mozilla Public License 2.0
583 stars 12 forks source link

Theme set delay + flashing #13

Closed danjenson closed 4 years ago

danjenson commented 4 years ago

So I tested this out -- nice work. I couldn't help but notice, however, the delay in setting the theme on load. Every time a new window opens, it queries to set the theme, which causes a few flashes while it updates.

My ideal workflow would be permanently setting the theme in firefox (if it's possible, using something like local storage, so it's available on boot without contacting the daemon), and then setting the theme values when I update my theme with a script (where I update all my other components that use that theme).

Frewacom commented 4 years ago

Agreed. The colors are stored in local storage whenever the theme is fetched or you change a color from the settings page. It is definitely unnecessary to query the daemon each time a window opens.

I will fix this tomorrow.

Frewacom commented 4 years ago

I have updated the extension and the daemon will no longer be queried on launch, as long as it can fetch the colors from local storage correctly. The delay with setting the theme will be there, since the addon is not an actual theme that can be selected. It must be applied programmatically on launch, hence the delay. I am not sure if this is something that can be fixed/added, but I will keep it in mind for the future.

I will close the issue for now.