Skip to content
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

Implement isSystemInDarkTheme for desktop #169

Open
igordmn opened this issue Dec 4, 2020 · 9 comments
Open

Implement isSystemInDarkTheme for desktop #169

igordmn opened this issue Dec 4, 2020 · 9 comments
Assignees
Labels
desktop enhancement New feature or request

Comments

@igordmn
Copy link
Collaborator

igordmn commented Dec 4, 2020

In Android target we can know if the system is in a dark mode using androidx.compose.foundation.isSystemInDarkTheme.

Probably we can implement it for desktop too. Some OS'es support dark mode.

P.S. if we will implement it, we should define "expect fun isSystemInDarkTheme" in the common code.

@igordmn igordmn added the enhancement New feature or request label Dec 4, 2020
@tkuenneth
Copy link

tkuenneth commented Dec 4, 2020

Would be a great addition.

@ggoraa
Copy link

ggoraa commented Dec 6, 2020

I agree. It will be very useful :D

@ggoraa
Copy link

ggoraa commented Dec 7, 2020

Where we can track the progress of implementing isSystemInDarkTheme()?

@akurasov
Copy link
Contributor

@igordmn, am I correct that isSystemInDarkTheme is working for desktop now?

@akurasov akurasov self-assigned this Jul 15, 2021
@igordmn
Copy link
Collaborator Author

igordmn commented Jul 15, 2021

It works, but we still need to:

  1. support Linux (Ubuntu at least)
  2. observe theme changing

@akurasov akurasov removed their assignment Jul 15, 2021
@dragossusi
Copy link

Gnome 42 added support for dark mode, it would be nice to detect it using this method

@rylexr
Copy link

rylexr commented May 17, 2023

Any progress on this? I tried it on MacOS, Ubuntu, and Windows and it's not working.

@long76
Copy link

long76 commented Jun 6, 2023

@long76
Copy link

long76 commented Jun 6, 2023

more link for linux https://unix.stackexchange.com/questions/701432/command-for-detecting-whether-the-system-is-using-a-dark-or-light-desktop-theme

telegramdesktop/tdesktop#17061

for linux just use org.freedesktop.appearance.color-scheme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants