From 0dd16ae849b4de154a5e292346bb7a1911ff2581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vivien=20Mah=C3=A9?= Date: Tue, 29 Oct 2024 18:44:10 +0100 Subject: [PATCH] TopBar - Properly set top bar colors on iOS --- .../tweener/czan/designsystem/atom/bars/TopBars.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/czan/src/commonMain/kotlin/com/tweener/czan/designsystem/atom/bars/TopBars.kt b/czan/src/commonMain/kotlin/com/tweener/czan/designsystem/atom/bars/TopBars.kt index 7d4b618..55df779 100644 --- a/czan/src/commonMain/kotlin/com/tweener/czan/designsystem/atom/bars/TopBars.kt +++ b/czan/src/commonMain/kotlin/com/tweener/czan/designsystem/atom/bars/TopBars.kt @@ -27,6 +27,7 @@ import com.tweener.czan.designsystem.atom.bars.icon.CloseBackIconButton import com.tweener.czan.designsystem.atom.icon.Icon import com.tweener.czan.designsystem.atom.text.Text import com.tweener.czan.theme.Size +import io.github.alexzhirkevich.cupertino.CupertinoTopAppBarDefaults import io.github.alexzhirkevich.cupertino.adaptive.AdaptiveTopAppBar import io.github.alexzhirkevich.cupertino.adaptive.ExperimentalAdaptiveApi import org.jetbrains.compose.resources.DrawableResource @@ -214,6 +215,16 @@ internal fun TopBarWithIcon( actionIconContentColor = colors.actionIconColor(), ) } + + cupertino { + this.colors = CupertinoTopAppBarDefaults.topAppBarColors( + containerColor = colors.containerColor(), + titleContentColor = colors.titleColor(), + navigationIconContentColor = colors.navigationIconColor(), + actionIconContentColor = colors.actionIconColor(), + ) + this.divider = {} + } }, ) }