Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
AccountTab: Show/Hide Account Functionality Added - alpha added
Browse files Browse the repository at this point in the history
  • Loading branch information
shamim-emon committed Nov 4, 2024
1 parent 2b4f1b8 commit 40d6a23
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import java.util.UUID
import androidx.compose.foundation.lazy.items
import androidx.compose.runtime.mutableStateListOf
import androidx.compose.runtime.snapshots.SnapshotStateList
import androidx.compose.ui.draw.alpha
import com.ivy.wallet.ui.theme.components.ItemIconSDefaultIcon
import com.ivy.wallet.ui.theme.findContrastTextColor
import com.ivy.wallet.ui.theme.toComposeColor
Expand Down Expand Up @@ -125,10 +126,15 @@ private fun HideAccountsRow(
onClick: (AccountId, Boolean) -> Unit
) {
val contrastColor = findContrastTextColor(account.color.value.toComposeColor())

val alpha = if(account.isVisible) {
1.0f
}else {
0.7f
}
Row(
modifier = Modifier
.padding(horizontal = 16.dp)
.alpha(alpha)
.fillMaxWidth()
.clip(UI.shapes.r4)
.background(color = account.color.value.toComposeColor()),
Expand Down

0 comments on commit 40d6a23

Please sign in to comment.