forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1762018 - Derive a color scheme when forcing preference colors. r…
…=morgan This patch is a bit bigger than I'd like, but it's mostly moving code around to centralize the color/color-scheme decisions we make when forcing colors. In practice, the only behavior change should be that when "use system colors" is false and we force colors, we force a color-scheme that matches the user-chosen background (via the LookAndFeel::IsDarkColor check). That should make sure that text from system colors is light and matches the user expectations. Before this patch, we used to force the color-scheme to light, but that was just so that we ended up looking at mLightColors. Instead, we achieve that via a separate bit (mForcedLightColorSet, naming up for debate, not a fan), so that we can use the right system colors otherwise. Another alternative I considered is making all non-link system colors return mDefaultBackground / mDefault depending on whether they are background / foreground colors. That seemed a lot more work and potentially a regression in various ways. I think this should be strictly an improvement instead. Differential Revision: https://phabricator.services.mozilla.com/D142423
- Loading branch information
Showing
9 changed files
with
125 additions
and
88 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
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
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
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
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
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
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
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
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