Closed Bug 1751432 Opened 2 years ago Closed 2 years ago

Try harder to match preferred color-scheme setting.

Categories

(Core :: Widget: Gtk, defect)

defect

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(1 file, 1 obsolete file)

No description provided.

The only behavior change here is that, if we have a color scheme
preference, we may try to use the alt theme rather than the system
theme, rather than just setting gtk-application-prefer-dark-theme which
themes are not guaranteed to honor.

But this also makes the whole init process clearer and faster when the
final theme should be the alt theme (either due to the Firefox theme or
due to the preferred color-scheme preference). Before:

  • Init system theme.
  • Configure alt theme.
  • Init alt theme.
  • Restore system theme in WithAltThemeConfigured.
  • Configure the alt theme in MatchFirefoxThemeIfNeeded.

Now:

  • Init system theme.
  • Configure alt theme.
  • Init alt theme.

When using Breeze Gtk, the alt theme is detected as Adwaita Dark. I would prefer not having Firefox use Adwaita Dark in that case.

When https://bugs.kde.org/show_bug.cgi?id=448877 is fixed it should switch to Breeze-dark. Until then Adwaita-dark is the less bad we can do.

(And if the Breeze theme is dark we'd still use that)

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/19124dfc0553
Clean up LookAndFeel init, and try harder to match the preferred appearance. r=stransky
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
Regressions: 1751723

This was needed before bug 1751432 but isn't anymore, and can cause
issues. If the system GTK theme is dark we should arguably not switch to
light in that case.

Comment on attachment 9260403 [details]
Bug 1751432 - Fix ComputeColorSchemeSetting to stop assuming 0 == Light. r=stransky

Revision D136752 was moved to bug 1751723. Setting attachment 9260403 [details] to obsolete.

Attachment #9260403 - Attachment is obsolete: true

Causing bad colors on my latest nightly. See https://bugzilla.mozilla.org/show_bug.cgi?id=1751735

See also my previous bug that might be related. https://bugzilla.mozilla.org/show_bug.cgi?id=1742299

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: