Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,11 @@ val LocalSafeAreaTop = compositionLocalOf { 0f }
val LocalSafeAreaBottom = compositionLocalOf { 0f }
val LocalAvailableWidth = compositionLocalOf { 390f }
val LocalAvailableHeight = compositionLocalOf { 844f }

/**
* True when a root host renders a persistent background layer beneath the
* content (e.g. mobile-ui's `background_layer` map). Chrome that normally
* paints an opaque canvas — the tabs Scaffold — goes transparent so the
* layer shows through.
*/
val LocalBackgroundLayerPresent = compositionLocalOf { false }
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,13 @@ fun NativeRootTabsRenderer(node: NativeUINode, modifier: Modifier = Modifier) {
}

Scaffold(
// A persistent background layer (map behind the app) needs the
// content canvas transparent; otherwise keep the themed surface.
containerColor = if (LocalBackgroundLayerPresent.current) {
androidx.compose.ui.graphics.Color.Transparent
} else {
MaterialTheme.colorScheme.background
},
topBar = {
if (hasNavBar && !hideNavBar && !isOnSearchTab) {
TopAppBar(
Expand Down
Loading