Updated on 2026-08-14
This commit is contained in:
parent
20484baaf1
commit
bee4019e8b
49 changed files with 1256 additions and 72 deletions
|
|
@ -102,6 +102,7 @@
|
|||
<item quantity="one">%d address</item>
|
||||
<item quantity="other">%d addresses</item>
|
||||
</plurals>
|
||||
<string name="address_book_choose_address">Choose address</string>
|
||||
<string name="address_book_contact">Contact</string>
|
||||
<string name="address_book_contact_name">Contact name</string>
|
||||
<string name="address_book_copy_address">Copy address</string>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import com.tangem.core.ui.res.TangemThemePreview
|
|||
import com.tangem.core.ui.res.TangemThemePreviewRedesign
|
||||
|
||||
enum class AccountIconSize {
|
||||
Default, Large, Medium, Small, ExtraSmall, RedesignedDefault, RedesignExtraSmall, RedesignLarge
|
||||
Default, Large, Medium, Small, ExtraSmall, RedesignedDefault, RedesignExtraSmall, RedesignLarge, Contact
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -133,6 +133,7 @@ fun AccountCharIcon(char: Char, color: Color, size: AccountIconSize, modifier: M
|
|||
AccountIconSize.RedesignedDefault -> TangemTheme.typography2.headingSemibold28
|
||||
AccountIconSize.RedesignExtraSmall -> TangemTheme.typography2.captionMedium11
|
||||
AccountIconSize.RedesignLarge -> TangemTheme.typography3.heading.medium
|
||||
AccountIconSize.Contact -> TangemTheme.typography3.body.medium
|
||||
}
|
||||
|
||||
val textSize by animateFloatAsState(
|
||||
|
|
@ -168,6 +169,7 @@ private fun AccountIconSize.iconSizeInDp(): Dp = when (this) {
|
|||
AccountIconSize.RedesignedDefault -> 20.dp
|
||||
AccountIconSize.RedesignExtraSmall -> 8.dp
|
||||
AccountIconSize.RedesignLarge -> 32.dp
|
||||
AccountIconSize.Contact -> 20.dp
|
||||
}
|
||||
|
||||
fun AccountIconSize.toBoxSize(): Dp = when (this) {
|
||||
|
|
@ -179,6 +181,7 @@ fun AccountIconSize.toBoxSize(): Dp = when (this) {
|
|||
AccountIconSize.RedesignedDefault -> 40.dp
|
||||
AccountIconSize.RedesignExtraSmall -> 16.dp
|
||||
AccountIconSize.RedesignLarge -> 80.dp
|
||||
AccountIconSize.Contact -> 40.dp
|
||||
}
|
||||
|
||||
private fun AccountIconSize.boxShapeSizeInDp(): Dp = when (this) {
|
||||
|
|
@ -190,6 +193,7 @@ private fun AccountIconSize.boxShapeSizeInDp(): Dp = when (this) {
|
|||
AccountIconSize.RedesignedDefault -> 12.dp
|
||||
AccountIconSize.RedesignExtraSmall -> 6.dp
|
||||
AccountIconSize.RedesignLarge -> 80.dp
|
||||
AccountIconSize.Contact -> 100.dp
|
||||
}
|
||||
|
||||
@Preview(showBackground = true)
|
||||
|
|
@ -233,7 +237,8 @@ private fun Sample() {
|
|||
AccountIconSize.ExtraSmall -> AccountIconSize.RedesignedDefault
|
||||
AccountIconSize.RedesignedDefault -> AccountIconSize.RedesignExtraSmall
|
||||
AccountIconSize.RedesignExtraSmall -> AccountIconSize.RedesignLarge
|
||||
AccountIconSize.RedesignLarge -> AccountIconSize.Default
|
||||
AccountIconSize.RedesignLarge -> AccountIconSize.Contact
|
||||
AccountIconSize.Contact -> AccountIconSize.Default
|
||||
}
|
||||
}) { Text("Change") }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue