signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.6k stars 2.66k forks source link

After startup, Desktop doesn't honor system theme changes (Linux) #5091

Open genericusername3 opened 3 years ago

genericusername3 commented 3 years ago

Bug Description

Signal does follow system theme but does not react to changes to the GTK theme after startup. This is especially inconvenient when using the --start-in-tray option to receive notifications and using something like the Gnome extension "Night theme switcher" to change GTK themes depending on daytime.

Steps to Reproduce

  1. Choose "System" in Preferences → Theme
  2. Change GTK theme from dark to light or vice versa

Actual Result:

The Signal theme does not update with the GTK theme, even when switching to another theme (which works, don't worry) and back.

Expected Result:

The Signal theme should update with the GTK theme (at least after closing the window and re-opening it from the tray).

Screenshots

Signal (preferences dialogue open) and GNOME Tweaks next to each other, "System" selected in Signal theme, "Adwaita-dark" selected in GNOME Tweaks. All open windows are in dark theme. GNOME's appearance settings to the right (gnome-tweaks)

Signal (preferences dialogue open) and GNOME Tweaks, "Adwaita" selected in GNOME Tweaks. Tweaks in light theme, Signal's content in dark theme After changing GTK theme, Signal stays dark

Signal (preferences dialogue open) and GNOME Tweaks, "Adwaita" selected in GNOME Tweaks. Tweaks in light theme, Signal's content in dark theme, except for the preferences dialog, which is also light theme When closing and re-opening the preferences, they become light. Signal itself, however, stays dark (even when closing the window [to tray]) until an app restart.

Platform Info

Signal Version: v1.40.1

Operating System: Linux (Manjaro Linux 20.2.1, GNOME Shell 3.38.3, Kernel 5.9.16)

Linked Device Version: Don't think this is needed, this only concerns the desktop client

Link to Debug Log

Don't think this is needed, this only concerns the desktop client

gabrc52 commented 3 years ago

To me, it doesn't seem to honor the system theme at all, even after an app restart

rr- commented 2 years ago

I'd appreciate either this, or a way to tell Signal to switch the theme between dark and light.

amadeusp commented 1 year ago

Is there any work done to fix this? From reading through the comments this seems to be "broken" not only on Linux but also on macOS, correct?

I am on Manjaro 22.0.0 Sikaris, running GNOME 43.1, on Wayland 1.21.0-2 and for me the window decorations are the only thing that follow the "System" setting for "Appearance" > "Theme".

As long as "Appearance" > "Theme" is set to "System" the actual app UI is not following the system setting.

Changing the setting to "Dark" or "Light" respectively works flawlessly though.

Would be nice if "System" would work as well. :relaxed:

indutny-signal commented 1 year ago

@amadeusp this is a Linux-only issue, unfortunately. I don't think we actually acknowledged that, but this isn't the issue in Signal Desktop itself, but rather a one the electron.

igalic commented 1 year ago

perhaps we should link to the appropriate electron issue then? there seem to be a few https://github.com/electron/electron/issues?q=is%3Aissue+is%3Aopen+system+theme

slynobody commented 1 year ago

there are a bunch of open issues on this bug at electron-apps (like signal and others), all pointing back to electron itself.

you simply cant change the theme of electron-apps on konsole or os-level currently (electron is the last platform on linux with this problem) which renders all external tools on this useless. is there any news on this?

Igetin commented 1 year ago

The upstream issue in Chromium was fixed yesterday, at long last. They have implemented a new DarkModeManagerLinux view that monitors the FreeDesktop settings portal, and falls back to GTK/QT theme monitoring for systems where the portal is not supported.

The fix is included Chromium 114, which is due for a stable (Chrome) release on the 30th of May. Electron follows Chromium in its releases, so the fix should land in Electron stable 25.0.0 on the same day.

nekohayo commented 1 year ago

As issue #5155 seems to indicate, there is still yet another issue to fix in Electron: https://github.com/electron/electron/pull/38977

Igetin commented 1 year ago

Yes, Electron 25 did not actually yet adapt their API to reflect the Chromium changes, which causes the old workarounds to interfere with e.g. the dark mode setting in GNOME. They’ve been quiet on Electron’s side about the problem, and the original issue has actually been incorrectly closed for months despite comments by users and VS Code developers stating that the problem still exists.