Files
simplex-chat/apps/multiplatform/common
Narasimha-sc 2c2337b07c android, desktop: keep wide images at natural aspect ratio without crashing (#7125)
* android, desktop: keep wide images at natural aspect ratio without crashing

The merged fix clamped the framed image preview's aspect ratio at 2.33,
which prevents the Constraints overflow crash but reshapes every image
wider than 2.33:1 to 2.33:1.

Compute the box height directly (height = w * min(h / w, 2.33f)) instead
of deriving it via Modifier.aspectRatio. Very wide images keep their
natural ratio (no upper clamp) while taller images stay capped at 2.33,
and the overflow-prone width = height * ratio derivation is removed
entirely. This mirrors how the iOS app sizes image previews.

* docs: update wide-image crash plan for natural-ratio fix

* remove comment

---------

Co-authored-by: Evgeny <evgeny@poberezkin.com>
2026-07-02 10:48:51 +01:00
..