mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-24 15:36:59 +01:00
FIX: colors were hard to read
This commit is contained in:
parent
4143634bd0
commit
41f8a22a21
1 changed files with 12 additions and 3 deletions
|
@ -2,6 +2,8 @@ import SwiftUI
|
|||
|
||||
@available(iOS 15.0, *)
|
||||
struct CompactPriceView: View {
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
|
||||
let price: String
|
||||
let lastUpdated: String
|
||||
let code: String
|
||||
|
@ -12,14 +14,16 @@ struct CompactPriceView: View {
|
|||
Text(price)
|
||||
.font(.title)
|
||||
.bold()
|
||||
.foregroundColor(priceTextColor)
|
||||
.shadow(color: Color.black.opacity(0.2), radius: 1, x: 0, y: 1)
|
||||
.multilineTextAlignment(.center)
|
||||
.dynamicTypeSize(.large ... .accessibility5)
|
||||
.accessibilityLabel("Bitcoin price: \(price)")
|
||||
|
||||
VStack(alignment: .center, spacing: 8) {
|
||||
Text("\(code)")
|
||||
Text("\(lastUpdated)")
|
||||
Text("\(dataSource)")
|
||||
Text(code)
|
||||
Text(lastUpdated)
|
||||
Text(dataSource)
|
||||
}
|
||||
.font(.subheadline)
|
||||
.foregroundColor(.secondary)
|
||||
|
@ -29,4 +33,9 @@ struct CompactPriceView: View {
|
|||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
|
||||
// Adaptive color for the price text using system built-in colors
|
||||
var priceTextColor: Color {
|
||||
colorScheme == .dark ? .cyan : .blue
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue