Skip to content

Commit d92181f

Browse files
Mauker1alisen
authored andcommitted
Works on my machine
1 parent f811238 commit d92181f

2 files changed

Lines changed: 40 additions & 1 deletion

File tree

app/src/main/java/de/berlindroid/zepatch/patchable/MaukerMakesLogo.kt

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import androidx.compose.foundation.Image
55
import androidx.compose.foundation.background
66
import androidx.compose.foundation.border
77
import androidx.compose.foundation.layout.Box
8+
import androidx.compose.foundation.layout.Column
89
import androidx.compose.foundation.layout.padding
910
import androidx.compose.foundation.layout.size
1011
import androidx.compose.foundation.shape.RoundedCornerShape
@@ -55,8 +56,46 @@ fun MaukerMakesLogo(
5556
}
5657
}
5758

59+
@Patch("MaukerMakesInverted")
60+
@Composable
61+
fun MaukerMakesLogoInverted(
62+
shouldCapture: Boolean = false,
63+
onBitmap: (ImageBitmap) -> Unit = {},
64+
) {
65+
SafeArea(
66+
shouldCapture = shouldCapture,
67+
onBitmap = onBitmap,
68+
) {
69+
Box(
70+
modifier = Modifier
71+
.background(
72+
color = Color.Transparent,
73+
shape = RoundedCornerShape(100)
74+
)
75+
.border(
76+
BorderStroke(
77+
5.dp,
78+
Color.White
79+
), RoundedCornerShape(100)
80+
)
81+
82+
) {
83+
Image(
84+
modifier = Modifier
85+
.size(200.dp)
86+
.padding(16.dp),
87+
painter = painterResource(R.drawable.mauker_makes_logo_inverted ),
88+
contentDescription = null
89+
)
90+
}
91+
}
92+
}
93+
5894
@Preview
5995
@Composable
6096
fun MaukerMakesLogoPreview() {
61-
MaukerMakesLogo()
97+
Column {
98+
MaukerMakesLogo()
99+
MaukerMakesLogoInverted()
100+
}
62101
}
13.3 KB
Loading

0 commit comments

Comments
 (0)