For my project that I'm converting from android co...
# compose-desktop
c
For my project that I'm converting from android compose to jetbrains compose, I created a theme that is basically a replica of the "jetsnack" compose sample app. https://github.com/android/compose-samples/tree/main/Jetsnack/app/src/main/java/com/example/jetsnack/ui/theme So my project (just like jetsnack) has a Color.kt, Shape.kt, Type.kt and Theme.kt. Moving those 4 files from android to Cfd works almost flawlessly except for two issues. 1. Type.kt -> creating a font is not working. Example:
Font(R.font.montserrat_light, FontWeight.Light)
How do you work with R.whatever in CfD? 2. Theme.kt -> Surprisingly most everything in here works too. But
isSystemInDarkTheme
does not compile on desktop.
import androidx.compose.foundation.isSystemInDarkTheme
Appreciate any advice. Thanks!
c
Gotcha. Didn't know if I was missing something. Anyone else know anything about
R.font...
?
g
Good tutorial for windows and mac dark theme support (temporary workaround) https://dev.to/tkuenneth/automatically-switch-to-dark-mode-and-back-in-compose-for-desktop-303l
k
This should probably be at the level of Skiko that would call native APIs instead of running
execute