diff --git a/apps/ios/Shared/Assets.xcassets/wefunder_logo.imageset/Contents.json b/apps/ios/Shared/Assets.xcassets/wefunder_logo.imageset/Contents.json new file mode 100644 index 0000000000..182abac4a6 --- /dev/null +++ b/apps/ios/Shared/Assets.xcassets/wefunder_logo.imageset/Contents.json @@ -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 + } +} diff --git a/apps/ios/Shared/Assets.xcassets/wefunder_logo.imageset/wefunder_logo.png b/apps/ios/Shared/Assets.xcassets/wefunder_logo.imageset/wefunder_logo.png new file mode 100644 index 0000000000..ac90142f8d Binary files /dev/null and b/apps/ios/Shared/Assets.xcassets/wefunder_logo.imageset/wefunder_logo.png differ diff --git a/apps/ios/Shared/Views/ChatList/GetStakeBanner.swift b/apps/ios/Shared/Views/ChatList/GetStakeBanner.swift index 741cb7e273..1ba9b4ab09 100644 --- a/apps/ios/Shared/Views/ChatList/GetStakeBanner.swift +++ b/apps/ios/Shared/Views/ChatList/GetStakeBanner.swift @@ -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()) } diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/GetStakeBanner.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/GetStakeBanner.kt index 9d6833854e..81ddf8ae53 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/GetStakeBanner.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/GetStakeBanner.kt @@ -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) { diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/images/wefunder_logo@4x.png b/apps/multiplatform/common/src/commonMain/resources/MR/images/wefunder_logo@4x.png new file mode 100644 index 0000000000..ac90142f8d Binary files /dev/null and b/apps/multiplatform/common/src/commonMain/resources/MR/images/wefunder_logo@4x.png differ