Closed Bug 1535230 Opened 5 years ago Closed 5 years ago

firefox not picking up GTK theme when GDK_BACKEND=wayland

Categories

(Core :: Widget: Gtk, defect, P3)

60 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: carlo, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Steps to reproduce:

  1. Set Adwaita:dark as the default GTK3 theme
  2. Launch firefox with GDK_BACKEND=wayland

Actual results:

Firefox seems to be using the Adwaita:light theme.

Expected results:

Firefox should have used the Adwaita:dark theme.

When using the x11 backend, firefox picks up Adwaita:dark by default.

The expected behavior can be produced by adding the additional environment variable GTK_THEME=Adwaita:dark.

Version: 60 Branch → 65 Branch
Version: 65 Branch → 60 Branch
Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Which distro do you run? Also how do you set the theme? Thanks.

Flags: needinfo?(carlo)

Running Arch Linux using sway as my window manager.

I set the GTK theme using:

~/.gtkrk-2.0

gtk-theme-name="Adwaita-dark"
gtk-icon-theme-name="Adwaita"
gtk-cursor-theme-name="Adwaita"
gtk-font-name="Sans 12"

~/.config/gtk-3.0/settings.ini

[Settings]
gtk-theme-name=Adwaita-dark
gtk-application-prefer-dark-theme=true
gtk-icon-theme-name=Adwaita
gtk-cursor-theme-name=Adwaita
gtk-font-name=Sans 12

Flags: needinfo?(carlo)

You need to enable the dark theme variants, set widget.chrome.allow-gtk-dark-theme in about:config.

That did indeed fix the issue. Perhaps that option should be enabled by default? Also possibly a "bug" that the X11this option did not need to be enabled?

You need to enable the dark theme variants, set widget.chrome.allow-gtk-dark-theme in about:config.

Is it work for you on packages.ubuntu.com and mail.ru (white text in white input fields) or login.ubuntu.com? (black text in black input fields). Testing on today Nightly build, also on Wayland.

Priority: -- → P3

I also have this problem, but I have set Breeze theme - FF uses Adwaita.
So FF doesn't only use Light themes instead of Dark but rather always Adwaita.

I also see the same issue using FF developer edition. Regardless which theme I set through gnome tweak tool, FF always uses Adwaita to render checkboxes and native elements within websites. This is also on wayland. Are there any configs or startup flags to test with to provide further feedback?

(In reply to Johannes Zellner from comment #7)

I also see the same issue using FF developer edition. Regardless which theme I set through gnome tweak tool, FF always uses Adwaita to render checkboxes and native elements within websites. This is also on wayland. Are there any configs or startup flags to test with to provide further feedback?

Please run in terminal as 'MOZ_LOG="Widget:5" firefox > log.txt 2>&1' and attach the log here. You can also:

  • set widget.chrome.allow-gtk-dark-theme to true at about:config to disable dark theme autoconfiguration
  • add 'widget.content.gtk-theme-override' string key at about:config and set theme for content

We may add 'widget.content.gtk-theme-override' key to about:config to simplify the override theme configuration.

Attached file log.txt

Didn't know how to attach inline here, so as requested, the log when running

MOZ_LOG="Widget:5" firefox > log.txt 2>&1

(In reply to Martin Stránský [:stransky] from comment #8)

(In reply to Johannes Zellner from comment #7)

I also see the same issue using FF developer edition. Regardless which theme I set through gnome tweak tool, FF always uses Adwaita to render checkboxes and native elements within websites. This is also on wayland. Are there any configs or startup flags to test with to provide further feedback?

  • set widget.chrome.allow-gtk-dark-theme to true at about:config to disable dark theme autoconfiguration

Setting widget.chrome.allow-gtk-dark-theme to true brings back the correctly themed input elements back after a FF restart.

Assignee: nobody → stransky

Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5d44802ff723
[Linux/Gtk] Add widget.content.gtk-theme-override pref key to simplify the theme override, r=jhorak

Keywords: checkin-needed
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: