Closed Bug 1716285 Opened 3 years ago Closed 3 years ago

[KDE] Abnormal window button hover UI on dark theme without title bar

Categories

(Core :: Widget: Gtk, defect)

Desktop
Linux
defect

Tracking

()

RESOLVED MOVED

People

(Reporter: i, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

(This was initially Comment 5 of Bug 1714126)

Styling information:

[Parent 181086: Main Thread]: D/LookAndFeel nsLookAndFeel::EnsureInit
[Parent 181086: Main Thread]: D/LookAndFeel     toggling gtk-application-prefer-dark-theme
[Parent 181086: Main Thread]: D/LookAndFeel System Theme: Breeze. Alt Theme: Adwaita Dark

Versions:

  • KDE Plasma: 5.22.0
  • KDE Frameworks: 5.83.0
  • Qt: 5.15.2
  • Firefox: 2021-06-13 with "title bar" off

It seems to be a regression from the fix for Bug 1707872 [1].

  1. https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=feaff6bddf649886164bfb5897dbf33b8789d930&tochange=0e6c67113ca7dba2de8101156993c563da62a3a1

The regression window seems a bit surprising, but will try to repro, I suspect I was missing the "titlebar off" bit. Are you using X11 or Wayland?

Flags: needinfo?(emilio)
Regressed by: 1707872
Has Regression Range: --- → yes

(In reply to Emilio Cobos Álvarez (:emilio) from comment #1)

Are you using X11 or Wayland?

I'm using X11. Also - if it matters - I've set "ui.systemUsesDarkTheme" to 1.

Great, I can repro now, thank you!

Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Abnormal window button hover UI on dark theme without title bar → [KDE] Abnormal window button hover UI on dark theme without title bar

Ok, so here's what's going on... I think it is fair to consider this a KDE bug:

  • When you set the global theme to "Breeze" via the KDE system settings, they create a ~/.config/gtk-3.0/window_decorations.css file (here).
  • They also load an extension to watch for file changes to that etc (here), which is what takes care of applying the style, ultimately.

But then Firefox (since bug 1707872) when you have a dark Firefox theme, tries to override that theme to "Adwaita Dark" (so that there's proper contrast etc). However that gtk module doesn't watch for theme changes and thus it fails to remove the Breeze-specific CSS, causing this ugly styling...

I think it should be only fair to fix the KDE module to at the very least deal with theme changes to non-Breeze themes. I'll look into that, but if someone wants to go ahead before me, then please be my guest :)

Another possible fix (which would be really cool) would be to, ideally, create a dark variant of the "Breeze" theme. Then Firefox wouldn't fall back to "Adwaita Dark".

Something I did try (but that unfortunately doesn't work) is to unload the GTK module when switching themes. But there's no cleanup function which would remove the CSS provider, so that doesn't cut it.

I'll give a shot at sending a patch upstream.

Assignee: nobody → emilio
Flags: needinfo?(emilio)
Depends on: 1716462

Let's resolve this as moved as it should be fixed by https://invent.kde.org/plasma/kde-gtk-config/-/merge_requests/31, and there's not much we can do here to work around it.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → MOVED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: