JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.42k stars 1.12k forks source link

[Web] incorrect windosw size in high resolution monitor #4517

Open Sanlorng opened 3 months ago

Sanlorng commented 3 months ago

Describe the bug A clear and concise description of what the bug is.

Affected platforms

Versions

To Reproduce Steps and/or the code snippet to reproduce the behavior:

  1. Create Compose Wasm Project.

  2. Open compose web app in a browser with 4k 150% scale Monitor

  3. Canvas can't fill the whole web content size. image

  4. if i changed the scale in the browser, if scale up, canvas' size will decrese, if scale down, canvas'size will increase. image image

  5. if i change monitor'setting to the 1080P 100%s scale,the canvas can fill whole web content size. image

Expected behavior Compose web app can fill whole content size in the high resolution monitor.

Screenshots See above.

Additional context Add any other context about the problem here.

Skaldebane commented 3 months ago

This is not a Windows-specific issue. Happens on any browser on Linux and Android as well, and the main cause is zoom, whether manual in the browser, or system-wide like scaling settings.

okushnikov commented 13 hours ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.