Skip to content

Commit 5824281

Browse files
committed
Small refacto.
1 parent 615022b commit 5824281

File tree

1 file changed

+5
-4
lines changed
  • libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms

1 file changed

+5
-4
lines changed

libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/ElementLogoAtom.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import io.element.android.libraries.theme.ElementTheme
5353
fun ElementLogoAtom(
5454
size: ElementLogoAtomSize,
5555
modifier: Modifier = Modifier,
56+
darkTheme: Boolean = isSystemInDarkTheme(),
5657
) {
5758
val outerSize = when (size) {
5859
ElementLogoAtomSize.Large -> 158.dp
@@ -70,19 +71,19 @@ fun ElementLogoAtom(
7071
ElementLogoAtomSize.Large -> 1.dp
7172
ElementLogoAtomSize.Medium -> 0.38.dp
7273
}
73-
val blur = if (isSystemInDarkTheme()) {
74+
val blur = if (darkTheme) {
7475
160.dp
7576
} else {
7677
24.dp
7778
}
7879
//box-shadow: 0px 6.075949668884277px 24.30379867553711px 0px #1B1D2280;
79-
val shadowColor = if (isSystemInDarkTheme()) {
80+
val shadowColor = if (darkTheme) {
8081
Color.Black.copy(alpha = 0.4f)
8182
} else {
8283
Color(0x401B1D22)
8384
}
84-
val backgroundColor = if (isSystemInDarkTheme()) Color.White.copy(alpha = 0.2f) else Color.White.copy(alpha = 0.4f)
85-
val borderColor = if (isSystemInDarkTheme()) Color.White.copy(alpha = 0.8f) else Color.White.copy(alpha = 0.4f)
85+
val backgroundColor = if (darkTheme) Color.White.copy(alpha = 0.2f) else Color.White.copy(alpha = 0.4f)
86+
val borderColor = if (darkTheme) Color.White.copy(alpha = 0.8f) else Color.White.copy(alpha = 0.4f)
8687
Box(
8788
modifier = modifier
8889
.size(outerSize)

0 commit comments

Comments
 (0)