Open rock3r opened 1 year ago
Hi! I faced the same issue :( I opened a conversation in Kotlin slack about it and we found what it's working fine on Linux and macOS without any black edges, it's Windows only issue.
Also, we've found this long-living Swing issue from 2005 and I think they may be related to each other.
Related issue: https://github.com/JetBrains/compose-multiplatform/issues/2475
same...
same, any plans to fix it or is there a solution exist?
same
@MatkovIvan When closing #4744 you mentioned that running on windows with OpenGL instead of DirectX was somewhat better with black bars instead of content streching? Is there a way to configure the apps to use OpenGL instead?
@babramovitch
System.setProperty("skiko.renderApi", "OPENGL")
@MatkovIvan That doesn't seem to make any change for me on Windows 10, does the same resizing instead of black bars calling it first thing in main()
Make sure that you've set it before initialization
fun main() {
System.setProperty("skiko.renderApi", "OPENGL")
singleWindowApplication {
println("RENDER API: ${window.renderApi}")
Box(Modifier.size(200.dp).background(color = Color.Green)) {}
}
}
Also, I've prepared a skiko fix that also should make it better - https://github.com/JetBrains/skiko/pull/923
Ah that was it, I was using fun main() = application {
and after was already too late.
Oh awesome about making it better as well, I'll keep an eye on that one. In the meantime using OpenGL looks better than what it was doing.
Thanks!
On desktop, when resizing a window, there can be black bars appearing on the edges of the window when it grows, or can cause the Compose contents of the window to be briefly cut off due to lack of recomposition during the resize.