Open Mats-Hjalmar opened 8 months ago
Do you have this code on the ios app side?
struct ContentView: View {
var body: some View {
ComposeView().ignoresSafeArea(.all)
}
}
Because I don't see the initial problem but found another one: If to rotate app through an up side down state then insets won't be updated
@Composable
internal fun App() = AppTheme {
Box(
Modifier
.fillMaxSize()
.windowInsetsPadding(WindowInsets.displayCutout)
.background(Color.Red)
) {
Text("TEXT")
}
}
Do you have this code on the ios app side?
struct ContentView: View { var body: some View { ComposeView().ignoresSafeArea(.all) } }
That is exactly my code.
Because I don't see the initial problem but found another one: If to rotate app through an up side down state then insets won't be updated
@Composable internal fun App() = AppTheme { Box( Modifier .fillMaxSize() .windowInsetsPadding(WindowInsets.displayCutout) .background(Color.Red) ) { Text("TEXT") } }
![]()
![]()
![]()
Quite amazing edge case. Any idea how to fix it?
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug
WindowInset.displayCutout
behaves like the camera is on both sides in the or none depending on what side you want calculated. (in Both layout directions)Affected platforms
Versions
To Reproduce
Expected behavior The padding value should be 0 if there is no camera on the right side.
Screenshots
Additional context This do not work either (left display cutout values with app in landscape)