forked from BrowserWorks/Waterfox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1527048 - [Linux/GTK] Fallback to Adwaita light GTK theme for con…
…tent when system theme has no light variant, r=karlt a=jcristau We previously disabled system dark themes for Firefox chrome and content by gtk-application-prefer-dark-theme settings. That option is no longer preferred by gnome project and was removed from tweaks tools. Theme makers are encouraged to use a different name for the dark theme variants, like Adwaita-dark, Yaru-dark and so on. This option also does not work when the GTK theme is missing the light variant completely. To address that, this patch implements heuristics based on https://www.w3.org/TR/AERT/#color-contrast to check if the system GTK theme has good contrast/visibility with default HTML colors (white background and black text). If widget.content.gtk-theme-override is empty and the system theme fails the test with gtk-application-prefer-dark-theme set to false, then Adwaita:light theme is used. This patch was tested with some distro default light themes (Ambiance, Radiance, Yaru - Ubuntu, Arc - KDE, Menta - MATE) and dark/light themes are recognized correctly. Differential Revision: https://phabricator.services.mozilla.com/D29823 --HG-- extra : source : 03970b83ea43d59feb24a24dc37f33a5460b61da
- Loading branch information
Showing
1 changed file
with
94 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters