KevinnZou / compose-webview-multiplatform

WebView for JetBrains Compose Multiplatform
https://kevinnzou.github.io/compose-webview-multiplatform/
Apache License 2.0
305 stars 39 forks source link

Render In Dark theme #125

Closed ShmuelCammebys closed 1 month ago

ShmuelCammebys commented 1 month ago

Currently, if the system is in dark theme, the text is still rendered as if in light theme (default), which can potentially be illegible. This feature request is to follow the dark theme preference of the system when rendering HTML, or add an argument to prefer or force dark theme. Related but distinct from #113 . Screenshot 2024-03-21 at 10 48 39 AM

KevinnZou commented 1 month ago

@ShmuelCammebys Thank you for your suggestions! In this PR, we will detect the system's dark mode and use WebSettingsCompat.setForceDark to change the webview's dark mode. This PR should resolve your issue. If you have any further questions, please let me know.