mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-27 00:39:00 +00:00
ui: add wefunder logo to crowdfunding banner (#7553)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "wefunder_logo.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@@ -30,8 +30,13 @@ struct GetStakeBanner: View {
|
||||
.foregroundColor(theme.colors.onBackground)
|
||||
.lineLimit(2)
|
||||
}
|
||||
// keeps the text clear of the dismiss X: its 4 leading + 12 wide + 16 trailing
|
||||
Spacer(minLength: 32)
|
||||
Spacer(minLength: 6)
|
||||
Image("wefunder_logo")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 48, height: 48)
|
||||
// roughly where the phone of the badge banner's hero is: 40pt from the card edge, less its 8pt inset
|
||||
.padding(.trailing, 32)
|
||||
}
|
||||
.modifier(BannerCard())
|
||||
}
|
||||
|
||||
+7
-4
@@ -1,5 +1,6 @@
|
||||
package chat.simplex.common.views.chatlist
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.*
|
||||
@@ -36,11 +37,12 @@ fun GetStakeBanner(showDismiss: Boolean, onTap: () -> Unit, onDismiss: () -> Uni
|
||||
Row(
|
||||
Modifier
|
||||
.bannerCard(onTap)
|
||||
// the end padding is the 8dp trailing inset plus the X's 36dp hit region
|
||||
.padding(start = 16.dp, end = 44.dp, top = 12.dp, bottom = 12.dp),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
// the logo sits roughly where the phone of the badge banner's hero is, 40dp from the card edge
|
||||
.padding(start = 16.dp, end = 40.dp, top = 12.dp, bottom = 12.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(6.dp)
|
||||
) {
|
||||
Column(verticalArrangement = Arrangement.spacedBy(4.dp)) {
|
||||
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(4.dp)) {
|
||||
Text(
|
||||
stringResource(MR.strings.invest_banner_title),
|
||||
style = MaterialTheme.typography.body1,
|
||||
@@ -57,6 +59,7 @@ fun GetStakeBanner(showDismiss: Boolean, onTap: () -> Unit, onDismiss: () -> Uni
|
||||
overflow = TextOverflow.Ellipsis
|
||||
)
|
||||
}
|
||||
Image(painterResource(MR.images.wefunder_logo), contentDescription = null, modifier = Modifier.size(48.dp))
|
||||
}
|
||||
|
||||
if (showDismiss) {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Reference in New Issue
Block a user