Closed Bug 1880563 Opened 1 year ago Closed 1 year ago

theming issues with `/org/x/apps/portal/color-scheme` set to `prefer-dark`

Categories

(Core :: Widget: Gtk, defect)

Firefox 122
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: binarynoise, Unassigned)

Details

Attachments

(1 file)

Attached file attachments.zip

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

Steps to reproduce:

  • fresh Arch Linux vm with cinnamon. Install Firefox, mint-l-theme
  • apply light theme, set color-scheme to default
  • start fresh Firefox instance
  • apply dark theme, set color-scheme to prefer-dark (theme does fallback)
  • apply light theme, set color-scheme to default
  • set color-scheme to prefer-dark, apply dark theme (theme does not fallback)

Actual results:

The falls back to internal dark theme when color-scheme is set after applying dark theme

Expected results:

It should apply the dark gtk theme both times without falling back

Ok, so this is a theme bug. The log has this:

[Parent 3979: Main Thread]: D/LookAndFeel toggling gtk-application-prefer-dark-theme
[Parent 3979: Main Thread]: D/LookAndFeel didn't work, falling back to default theme

This means that the Mint-L-Theme doesn't respect gtk-application-prefer-dark-theme. So we don't find a dark theme and fall back to Adwaita. For dark themes we try to guess the light theme name. But for light themes is pretty hard (most themes just have a -dark variant, but this one doesn't, the dark is in the middle of the name).

The right fix is making the theme properly react to that gtk setting.

Ok, thanks.
I'll open an issue over at Mint-L-Theme tomorrow

The Bugbug bot thinks this bug should belong to the 'Firefox::Theme' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Theme
Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Component: Theme → Widget: Gtk
Product: Firefox → Core
Resolution: --- → INVALID

One question though,
when setting the correct dark gtk-theme right after changing the color-scheme, why does the new theme not get applied and the fallback to adwaita removed?

That is a limitation of the way we apply the adwaita fallback. It prevents us from getting further theme name change notifications.

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

Attachment

General

Creator:
Created:
Updated:
Size: