-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: nativeTheme.shouldUseDarkColors not working on linux #28838
Comments
I have run into this as well on electron@14.2.9 |
This is probably my biggest annoyance in my day to day life. I have pretty much every application following my system wide dark mode preference at this point, except my browser and all my Electron applications, which is like half of my applications. Is this something Electron won't support before Chromium supports it natively? I feel like that could take a long time. It would be amazing if Electron could implement support for the (now standardized) Freedesktop system-wide dark mode preference: It doesn't seem like it would be a lot of effort. The logic would basically be:
Just among the applications I use every day, this would add automatic light/dark theme switching to:
|
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
This is certainly still an issue |
fuck that bot |
Related issue (newer, but with more technical details): #33635 |
Fixing this issue on Electron wouldn’t actually fix the theme sync for Discord, as they use the prefers-color-scheme CSS media query directly instead of Electron APIs. For Discord’s theme sync to work, this Chromium bug needs to be resolved. |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
Still reproducible on Electron 25, see this comment for details. |
This is needed after https://bugs.chromium.org/p/chromium/issues/detail?id=998903 and replaces the previous workaround to detect dark mode on GTK. Detect system dark theme preference via xdg settings portal: https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Closes: electron#38961 Closes: electron#28838 Signed-off-by: Robert Günzler <r@gnzler.io>
This is needed after https://bugs.chromium.org/p/chromium/issues/detail?id=998903 and replaces the previous workaround to detect dark mode on GTK. Detect system dark theme preference via xdg settings portal: https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Closes: electron#38961 Closes: electron#28838 Signed-off-by: Robert Günzler <r@gnzler.io>
feat: port DarkModeManagerLinux This is needed after https://bugs.chromium.org/p/chromium/issues/detail?id=998903 and replaces the previous workaround to detect dark mode on GTK. Detect system dark theme preference via xdg settings portal: https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Closes: #38961 Closes: #28838 Signed-off-by: Robert Günzler <r@gnzler.io> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
feat: port DarkModeManagerLinux This is needed after https://bugs.chromium.org/p/chromium/issues/detail?id=998903 and replaces the previous workaround to detect dark mode on GTK. Detect system dark theme preference via xdg settings portal: https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Closes: #38961 Closes: #28838 Signed-off-by: Robert Günzler <r@gnzler.io> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Robert Günzler <r@gnzler.io>
feat: port DarkModeManagerLinux This is needed after https://bugs.chromium.org/p/chromium/issues/detail?id=998903 and replaces the previous workaround to detect dark mode on GTK. Detect system dark theme preference via xdg settings portal: https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Closes: #38961 Closes: #28838 Signed-off-by: Robert Günzler <r@gnzler.io> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Robert Günzler <r@gnzler.io>
feat: port DarkModeManagerLinux This is needed after https://bugs.chromium.org/p/chromium/issues/detail?id=998903 and replaces the previous workaround to detect dark mode on GTK. Detect system dark theme preference via xdg settings portal: https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Closes: #38961 Closes: #28838 Signed-off-by: Robert Günzler <r@gnzler.io> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Robert Günzler <r@gnzler.io>
feat: port DarkModeManagerLinux This is needed after https://bugs.chromium.org/p/chromium/issues/detail?id=998903 and replaces the previous workaround to detect dark mode on GTK. Detect system dark theme preference via xdg settings portal: https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Closes: #38961 Closes: #28838 Signed-off-by: Robert Günzler <r@gnzler.io> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Robert Günzler <r@gnzler.io>
feat: port DarkModeManagerLinux This is needed after https://bugs.chromium.org/p/chromium/issues/detail?id=998903 and replaces the previous workaround to detect dark mode on GTK. Detect system dark theme preference via xdg settings portal: https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Closes: #38961 Closes: #28838 Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Robert Günzler <r@gnzler.io>
feat: port DarkModeManagerLinux This is needed after https://bugs.chromium.org/p/chromium/issues/detail?id=998903 and replaces the previous workaround to detect dark mode on GTK. Detect system dark theme preference via xdg settings portal: https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Closes: #38961 Closes: #28838 Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Robert Günzler <r@gnzler.io>
feat: port DarkModeManagerLinux This is needed after https://bugs.chromium.org/p/chromium/issues/detail?id=998903 and replaces the previous workaround to detect dark mode on GTK. Detect system dark theme preference via xdg settings portal: https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Closes: #38961 Closes: #28838 Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Robert Günzler <r@gnzler.io>
feat: port DarkModeManagerLinux This is needed after https://bugs.chromium.org/p/chromium/issues/detail?id=998903 and replaces the previous workaround to detect dark mode on GTK. Detect system dark theme preference via xdg settings portal: https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Closes: electron#38961 Closes: electron#28838 Signed-off-by: Robert Günzler <r@gnzler.io> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Preflight Checklist
Electron Version
12.0.0
What operating system are you using?
Ubuntu
Operating System Version
20.04
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
returning true (i use dark mode)
Actual Behavior
returning false, regardless of color scheme.
Testcase Gist URL
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: