Use right colors on ForcedDarkElementTheme
This commit is contained in:
parent
07b9a8456b
commit
5720b2df1a
6 changed files with 43 additions and 4 deletions
|
|
@ -16,6 +16,7 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.runtime.DisposableEffect
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.toArgb
|
||||
import io.element.android.compound.colors.SemanticColorsLightDark
|
||||
|
||||
/**
|
||||
* Can be used to force a composable in dark theme.
|
||||
|
|
@ -23,6 +24,7 @@ import androidx.compose.ui.graphics.toArgb
|
|||
*/
|
||||
@Composable
|
||||
fun ForcedDarkElementTheme(
|
||||
colors: SemanticColorsLightDark,
|
||||
lightStatusBar: Boolean = false,
|
||||
content: @Composable () -> Unit,
|
||||
) {
|
||||
|
|
@ -47,5 +49,11 @@ fun ForcedDarkElementTheme(
|
|||
)
|
||||
}
|
||||
}
|
||||
ElementTheme(darkTheme = true, lightStatusBar = lightStatusBar, content = content)
|
||||
ElementTheme(
|
||||
darkTheme = true,
|
||||
compoundLight = colors.light,
|
||||
compoundDark = colors.dark,
|
||||
lightStatusBar = lightStatusBar,
|
||||
content = content,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue