I'm using `isSystemInDarkTheme()` to use the prope...
# compose-desktop
z
I'm using
isSystemInDarkTheme()
to use the proper colorscheme in my program, but it causes my program to never display. I just have this code
Copy code
@Composable
fun TauTheme(
    dark: Boolean = isSystemInDarkTheme(),
    content: @Composable () -> Unit
) {
    MaterialTheme(
        colorScheme = if (dark) darkColorScheme() else lightColorScheme(),
        content = content
    )
}
👍 1
ł
You should post everything in one thread to avoid spamming the channel. I use the same code as you have. On macOS it works fine.
z
I'm on Linux
ł
Do you have dark mode set on linux?
z
yes
ł
Does
isSystemInDarkTheme()
return true or false?
z
it doesnt return anything. it just hangs
k
That API is not yet implemented on desktop
z
Ah, that's unfortunate. I looked into it some and it seems to be possible through dbus on Linux and the registry on windows