EliverLara / firefox-nordic-theme

:snowflake: A dark theme for firefox theme created using the awesome Nord color palette.
353 stars 14 forks source link

125 fix #26

Open glasket opened 5 months ago

glasket commented 5 months ago

Small change to remove the incorrectly displayed icons on top of the titlebar buttons.

EliverLara commented 5 months ago

Hi, I'm sorry but what exactly fixes this?

glasket commented 5 months ago

Hi, I'm sorry but what exactly fixes this?

In Firefox 125 there are changes to the window button icons that result in the icons displaying even though the buttons should be disabled. This occurred on my machine (Fedora 38, using the GTK Nordic theme), and has been documented in a Lemmy post and a Reddit post.

I might have to add an at-rule if this messes up the theme when not used with a backing system theme, which I can check later.

glasket commented 5 months ago

Alright, yeah, with some more searching this seems to specifically be a Linux issue, and the display: none solution is just a bandaid.

This seems to be some sort of quirky behavior where you either have to use the "system theme - auto" option within Firefox or set widget.gtk.non-native-titlebar-buttons.enabled to false, otherwise Firefox tries to draw it's own buttons. I think 125 changed to make the icon the button visually, which triggered the break. Now, using the system theme solution, the issues are:

  1. the theme is making the buttons cyan, blue, and magenta due to a filter when prefers-color-scheme: dark, and
  2. when unfocused, hovering over the window will trigger the buttons to display a faded color and the icon.

Pretty sure this is basically the same problem, now in semi-reverse. Firefox is trying to draw the system buttons using the .titlebarbutton-icon elements, while the theme is drawing buttons underneath with rules that end up conflicting, causing the color issues and the weird rendering when unfocused.

I'll work on making changes to the PR that incorporate checks to turn off the theme buttons using the same logic as Firefox, plus making the buttons correctly replace the non-native buttons when they should be enabled.

EliverLara commented 5 months ago

I've fixed som CSD issues in e84e095d7588e6936d83fb7b1baafbb2bd8d7f23, Could you check how it works on your side, please?