[Bug] CSD GTK titlebar on GNOME does not follow dark/light theme setting
Bug Description
GNOME doesn't draw window decorations for native Wayland clients, so when AppFlowy runs as a native wayland client, Flutter uses GTK to draw a window decoration instead, but it seems that its theme is unaffected via org.freedesktop.appereance setting key
How to Reproduce
- Use GNOME on Wayland (Vanilla GNOME)
- Install appflowy
- Use appflowy
- Use gnome-control-center (GNOME settings) to change theme settings
Expected Behavior
For AppFlowy and CSD to go dark,
Currently, only AppFlowy goes dark, CSD titlebar stays
Operating System
Arch Linux, Freedesktop Flatpak runtime
AppFlowy Version(s)
0.3.2 (Flatpak)
Screenshots
Screencast dari 2023-09-25 01-12-36.webm
Additional Context
Also see Flutter upstream's status for org.freedesktop.appereance setting key : https://github.com/flutter/flutter/issues/92261 https://github.com/flutter/flutter/issues/135390
I can confirm that this also happens on KDE when using Wayland. Xwayland draws it fine.
Have you tried adw-gtk3?
https://github.com/AppFlowy-IO/AppFlowy/assets/68882116/10d553dc-2972-4ce1-b301-72d18935355c
I have this issue on GNOME 42.9 (on Ubuntu 22)
Seems related to https://github.com/flutter/flutter/issues/111453
I don't think this is fixed, I use Appflowy v0.7.8 and the issue is still there.
My system is archlinux + gnome.
ok, I find a solution, install this extension https://extensions.gnome.org/extension/4998/legacy-gtk3-theme-scheme-auto-switcher/, then use adw-gtk3. it will be perfect now.
so I guess the thing is, Appflowy does respect dark or light mode, however because Appflowy is a "legacy Applications", which means its csd is gtk3 style, and gnome doesn't provide a dark theme for "legacy Applications", Appflowy only uses the light gtk3 style title bar. The adw-gtk3 provides an adwaita theme for gtk3(lagacy apps), both light and dark mode. and the extension switches the mode automatically, thus solving the issue. Correct me if I am wrong (. So this issue could be closed because its not Appflowy's fault. I guess we should wait flutter to use gtk4 ? I don't know...