Skip to content

Commit 890f612

Browse files
authored
Merge pull request #261 from DimensionDev/bugfix/ui-wallet-history
Bugfix/ UI BUG, TokenDetailScene
2 parents 0228c3a + 2874cb5 commit 890f612

3 files changed

Lines changed: 25 additions & 7 deletions

File tree

wallet/src/androidMain/kotlin/com/dimension/maskbook/wallet/ui/scenes/wallets/collectible/CollectibleDetailScene.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,13 @@ fun CollectibleDetailScene(
126126
modifier = Modifier.weight(1f),
127127
onClick = { onSend.invoke() },
128128
elevation = ButtonDefaults.elevation(defaultElevation = 0.dp),
129-
colors = ButtonDefaults.buttonColors(backgroundColor = Color(0XFFFFB915))
129+
colors = ButtonDefaults.buttonColors(backgroundColor = Color(0XFFFFB915), contentColor = MaterialTheme.colors.onPrimary)
130130
) {
131-
Icon(painterResource(id = R.drawable.upload), contentDescription = null)
131+
Icon(
132+
painterResource(id = R.drawable.upload),
133+
contentDescription = null,
134+
tint = MaterialTheme.colors.onPrimary
135+
)
132136
Spacer(modifier = Modifier.width(4.dp))
133137
Text(
134138
text = stringResource(R.string.scene_wallet_balance_btn_Send),

wallet/src/androidMain/kotlin/com/dimension/maskbook/wallet/ui/scenes/wallets/token/TokenDetailScene.kt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import androidx.compose.foundation.layout.Spacer
3131
import androidx.compose.foundation.layout.fillMaxWidth
3232
import androidx.compose.foundation.layout.height
3333
import androidx.compose.foundation.layout.padding
34+
import androidx.compose.foundation.layout.size
3435
import androidx.compose.foundation.layout.width
3536
import androidx.compose.material.ButtonDefaults
3637
import androidx.compose.material.ExperimentalMaterialApi
@@ -104,13 +105,14 @@ fun TokenDetailScene(
104105
if (tokenData.logoURI != null) {
105106
Image(
106107
painter = rememberImagePainter(data = tokenData.logoURI),
108+
modifier = Modifier.size(38.dp),
107109
contentDescription = null,
108110
)
109111
}
110112
Spacer(modifier = Modifier.width(8.dp))
111113
Text(
112114
text = tokenData.name,
113-
style = MaterialTheme.typography.subtitle2,
115+
style = MaterialTheme.typography.h3,
114116
modifier = Modifier.weight(1f),
115117
color = Color.White,
116118
)
@@ -120,10 +122,12 @@ fun TokenDetailScene(
120122
Text(
121123
text = "${walletTokenData.count.humanizeToken()} ${tokenData.symbol}",
122124
color = Color.White,
125+
style = MaterialTheme.typography.h6,
123126
)
127+
Spacer(modifier = Modifier.width(4.dp))
124128
Text(
125129
text = (walletTokenData.count * tokenData.price).humanizeDollar(),
126-
style = MaterialTheme.typography.h6,
130+
style = MaterialTheme.typography.h4,
127131
color = Color.White,
128132
)
129133
}
@@ -149,9 +153,16 @@ fun TokenDetailScene(
149153
modifier = Modifier.weight(1f),
150154
onClick = { onSend.invoke() },
151155
elevation = ButtonDefaults.elevation(defaultElevation = 0.dp),
152-
colors = ButtonDefaults.buttonColors(backgroundColor = Color(0XFFFFB915))
156+
colors = ButtonDefaults.buttonColors(
157+
backgroundColor = Color(0XFFFFB915),
158+
contentColor = MaterialTheme.colors.onPrimary
159+
)
153160
) {
154-
Icon(painterResource(id = R.drawable.upload), contentDescription = null)
161+
Icon(
162+
painterResource(id = R.drawable.upload),
163+
contentDescription = null,
164+
tint = MaterialTheme.colors.onPrimary
165+
)
155166
Spacer(modifier = Modifier.width(4.dp))
156167
Text(
157168
text = stringResource(R.string.scene_wallet_balance_btn_Send),

wallet/src/androidMain/kotlin/com/dimension/maskbook/wallet/ui/widget/TransactionHistoryList.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import androidx.compose.ui.Modifier
4646
import androidx.compose.ui.graphics.Color
4747
import androidx.compose.ui.res.painterResource
4848
import androidx.compose.ui.res.stringResource
49+
import androidx.compose.ui.text.font.FontWeight
4950
import androidx.compose.ui.unit.dp
5051
import com.dimension.maskbook.common.ext.humanizeDollar
5152
import com.dimension.maskbook.common.ext.humanizeToken
@@ -121,7 +122,9 @@ private fun TokenDetailEmptyLayout() {
121122
)
122123
Spacer(Modifier.height(12.dp))
123124
Text(
124-
text = stringResource(R.string.scene_transaction_history_no_transaction)
125+
text = stringResource(R.string.scene_transaction_history_no_transaction),
126+
style = MaterialTheme.typography.h6.copy(fontWeight = FontWeight.W500),
127+
color = Color(0xFFA6A9B6)
125128
)
126129
}
127130
}

0 commit comments

Comments
 (0)