From bd253e3e37156aeac75929953e8954829ab18dfa Mon Sep 17 00:00:00 2001 From: OneWay Date: Sun, 4 Oct 2026 12:36:00 +0000 Subject: [PATCH] fix(settings): pin Add Source container to static insets With many fields, the Add Source sheet could keep re-triggering its settle animation: animated window insets reached the container while its height followed the content. Keep only the static status bar inset on the sheet container; the content already pads itself for the navigation bar and IME. --- .../research/ui/settings/components/DictionaryManagement.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/example/research/ui/settings/components/DictionaryManagement.kt b/app/src/main/java/com/example/research/ui/settings/components/DictionaryManagement.kt index 8cc4e69..f6a542f 100644 --- a/app/src/main/java/com/example/research/ui/settings/components/DictionaryManagement.kt +++ b/app/src/main/java/com/example/research/ui/settings/components/DictionaryManagement.kt @@ -10,6 +10,8 @@ import androidx.compose.animation.shrinkVertically import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.statusBars import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material3.ExperimentalMaterial3Api @@ -218,7 +220,8 @@ fun DictionaryManagement( focusManager.clearFocus(force = true) setShowUrlBottomSheet(false) }, - sheetState = sheetState + sheetState = sheetState, + contentWindowInsets = { WindowInsets.statusBars } ) { DictionaryUrlInputContent( existingSources = sources,