Is someone aware of a solution for the issue on Wi...
# compose
s
Is someone aware of a solution for the issue on Windows with the app windows minimum size? https://youtrack.jetbrains.com/issue/CMP-2285
a
Isnt is possible to wrap the app in a custom composable that watches the size state and then adjusts as needed when it is going off?
s
That didn't work for me. 🤷‍♂️
Setting the size is somehow bugged. Watching the size works.
a
Okay (
s
If you can figure out a working solution let me know. 🙏🏻
s
You likely want to do it at the JFrame level: https://alvinalexander.com/java/java-set-jframe-size/
s
That's discussed in the ticket above. The issue is that JFrame doesn't respect density. So to set a proper minimum size you need to multiply it with density. But if you do so a comparison between JFrame size & Compose managed window size kicks in and doubles the window size. It's a complex issue and I wasn't able to find a workaround yet.
Run your compose app on Windows where you have a 4K monitor and likely some scale like 150% or 200% set. You'll see the issue then very clearly. It's not an issue on macOS, it's a Windows related bug.