Steps to Reproduce
Calf 0.14.0 (also 0.13.0), Compose Multiplatform 1.12.0, iOS.
- Build a screen with
AdaptiveScaffold and an AdaptiveTopBar as its topBar.
- Launch the app with the device in portrait and open that screen.
- Rotate the device to landscape while staying on the screen.
Reverse case: open the screen in landscape, then rotate to portrait.
Expected Behavior
The scaffold's top content padding updates to the new native navigation bar height and safe-area inset
after rotation, so the content sits directly below the bar in both orientations.
Actual Behavior
The top padding keeps the value measured in the orientation the screen was opened in:
- Portrait → landscape: content keeps the portrait padding, leaving a large gap below the status bar.
- Landscape → portrait: the padding is too small, so content sits under the navigation bar.
Leaving the screen and coming back fixes it, because AdaptiveTopBar re-enters composition and measures again.
Cause: in navigation/AdaptiveTopBar.ios.kt, the height is measured in a LaunchedEffect(Unit) loop that
breaks once navBarHeightConsistencyCounter > 6 and is never restarted, so a rotation is never picked up.
Workaround: wrapping AdaptiveTopBar in key(LocalWindowInfo.current.containerSize) { ... } forces a
re-measure on rotation. A fix could restart the measurement when the view's size changes.
Module
calf-ui
Specify Other Module (if you selected "other" above)
No response
Platform
iOS
Library Version
latest
Steps to Reproduce
Calf 0.14.0 (also 0.13.0), Compose Multiplatform 1.12.0, iOS.
AdaptiveScaffoldand anAdaptiveTopBaras itstopBar.Reverse case: open the screen in landscape, then rotate to portrait.
Expected Behavior
The scaffold's top content padding updates to the new native navigation bar height and safe-area inset
after rotation, so the content sits directly below the bar in both orientations.
Actual Behavior
The top padding keeps the value measured in the orientation the screen was opened in:
Leaving the screen and coming back fixes it, because
AdaptiveTopBarre-enters composition and measures again.Cause: in
navigation/AdaptiveTopBar.ios.kt, the height is measured in aLaunchedEffect(Unit)loop thatbreaks oncenavBarHeightConsistencyCounter > 6and is never restarted, so a rotation is never picked up.Workaround: wrapping
AdaptiveTopBarinkey(LocalWindowInfo.current.containerSize) { ... }forces are-measure on rotation. A fix could restart the measurement when the view's size changes.
Module
calf-ui
Specify Other Module (if you selected "other" above)
No response
Platform
iOS
Library Version
latest