Skip to content

Commit 52eac6c

Browse files
committed
Use theme colours throughout the app
1 parent 8dcdea6 commit 52eac6c

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

app/src/main/java/org/bitcoindevkit/devkitwallet/presentation/ui/components/LoadingAnimation.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ import androidx.compose.ui.graphics.Color
2525
import androidx.compose.ui.unit.Dp
2626
import androidx.compose.ui.unit.dp
2727
import kotlinx.coroutines.delay
28+
import org.bitcoindevkit.devkitwallet.presentation.theme.DevkitWalletColors
2829

2930
@Composable
3031
fun LoadingAnimation(
31-
circleColor: Color = Color(0xffE9C46A),
32+
circleColor: Color = DevkitWalletColors.accent1,
3233
circleSize: Dp = 21.dp,
3334
animationDelay: Int = 800,
3435
initialAlpha: Float = 0.3f,

app/src/main/java/org/bitcoindevkit/devkitwallet/presentation/ui/components/TransactionCards.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ fun PendingTransactionCard(details: TxDetails, navController: NavController) {
100100
.padding(top = 16.dp, end = 16.dp)
101101
.size(size = 24.dp)
102102
.clip(shape = CircleShape)
103-
.background(Color(0xffE9C46A))
103+
.background(DevkitWalletColors.accent1)
104104
.align(Alignment.Top)
105105
)
106106
}

app/src/main/java/org/bitcoindevkit/devkitwallet/presentation/ui/screens/intro/OnboardingScreen.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fun OnboardingScreen(onFinishOnboarding: () -> Unit) {
9999
.size(size = 16.dp)
100100
.clip(shape = CircleShape)
101101
.background(
102-
if (currentIndex == 1) Color(0xffE9C46A) else Color(0xffE9C46A).copy(alpha = 0.3f)
102+
if (currentIndex == 1) DevkitWalletColors.accent1 else DevkitWalletColors.accent1.copy(alpha = 0.3f)
103103
)
104104
)
105105
Box(
@@ -108,7 +108,7 @@ fun OnboardingScreen(onFinishOnboarding: () -> Unit) {
108108
.size(size = 16.dp)
109109
.clip(shape = CircleShape)
110110
.background(
111-
if (currentIndex == 2) Color(0xffE9C46A) else Color(0xffE9C46A).copy(alpha = 0.3f)
111+
if (currentIndex == 2) DevkitWalletColors.accent1 else DevkitWalletColors.accent1.copy(alpha = 0.3f)
112112
)
113113
)
114114
Box(
@@ -117,7 +117,7 @@ fun OnboardingScreen(onFinishOnboarding: () -> Unit) {
117117
.size(size = 16.dp)
118118
.clip(shape = CircleShape)
119119
.background(
120-
if (currentIndex == 3) Color(0xffE9C46A) else Color(0xffE9C46A).copy(alpha = 0.3f)
120+
if (currentIndex == 3) DevkitWalletColors.accent1 else DevkitWalletColors.accent1.copy(alpha = 0.3f)
121121
)
122122
)
123123
}

app/src/main/java/org/bitcoindevkit/devkitwallet/presentation/ui/screens/wallet/ReceiveScreen.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import androidx.compose.ui.draw.shadow
4040
import androidx.compose.ui.graphics.Color
4141
import androidx.compose.ui.graphics.ImageBitmap
4242
import androidx.compose.ui.graphics.asImageBitmap
43+
import androidx.compose.ui.graphics.toArgb
4344
import androidx.compose.ui.platform.LocalContext
4445
import androidx.compose.ui.text.style.TextAlign
4546
import androidx.compose.ui.unit.dp
@@ -63,6 +64,7 @@ import org.bitcoindevkit.devkitwallet.presentation.theme.standardText
6364
import org.bitcoindevkit.devkitwallet.presentation.ui.components.SecondaryScreensAppBar
6465
import org.bitcoindevkit.devkitwallet.presentation.viewmodels.mvi.ReceiveScreenAction
6566
import org.bitcoindevkit.devkitwallet.presentation.viewmodels.mvi.ReceiveScreenState
67+
import androidx.core.graphics.set
6668

6769
private const val TAG = "ReceiveScreen"
6870

@@ -193,7 +195,8 @@ private fun addressToQR(address: String): ImageBitmap? {
193195
for (x in 0 until 1000) {
194196
for (y in 0 until 1000) {
195197
// DevkitWalletColors.primaryDark for dark and DevkitWalletColors.white for light
196-
bitMap.setPixel(x, y, if (bitMatrix[x, y]) 0xff203b46.toInt() else 0xffffffff.toInt())
198+
bitMap[x, y] =
199+
if (bitMatrix[x, y]) DevkitWalletColors.primaryDark.toArgb() else DevkitWalletColors.white.toArgb()
197200
}
198201
}
199202
return bitMap.asImageBitmap()

0 commit comments

Comments
 (0)