AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[Bug] CSD GTK titlebar on GNOME does not follow dark/light theme setting

Open RushingAlien opened this issue 3 years ago • 6 comments

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

  1. Use GNOME on Wayland (Vanilla GNOME)
  2. Install appflowy
  3. Use appflowy
  4. 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

RushingAlien avatar Sep 26 '23 03:09 RushingAlien

I can confirm that this also happens on KDE when using Wayland. Xwayland draws it fine.

frandmb avatar Mar 16 '24 14:03 frandmb

Have you tried adw-gtk3?

https://github.com/AppFlowy-IO/AppFlowy/assets/68882116/10d553dc-2972-4ce1-b301-72d18935355c

Microwave-WYB avatar Mar 20 '24 22:03 Microwave-WYB

I have this issue on GNOME 42.9 (on Ubuntu 22)

eburakova avatar Jun 02 '24 09:06 eburakova

Seems related to https://github.com/flutter/flutter/issues/111453

frandmb avatar Aug 15 '24 22:08 frandmb

I don't think this is fixed, I use Appflowy v0.7.8 and the issue is still there. My system is archlinux + gnome. image

zhaob1n avatar Dec 25 '24 17:12 zhaob1n

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...

zhaob1n avatar Dec 28 '24 13:12 zhaob1n