Skip to content

Commit ba74a83

Browse files
authored
Farbe der Snabble Pay Karte anpassen (#50)
1 parent eed26a9 commit ba74a83

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

Example/SnabblePayExample/Utilities/Modifiers.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct CardStyle: ViewModifier {
6060
func body(content: Content) -> some View {
6161
content
6262
.frame(minWidth: 320, minHeight: 220, maxHeight: 220)
63-
.background(self.top ? Self.topMaterial : Self.regularMaterial, in: RoundedRectangle(cornerRadius: 12))
63+
.background(Color(white: 1, opacity: 0.66), in: RoundedRectangle(cornerRadius: 12))
6464
.rotation3DEffect(.degrees(motionManager.xCoordinate * 20), axis: (x: 0, y: 1, z: 0))
6565
.padding([.leading, .trailing])
6666
.shadow(radius: 4, y: 2)

Example/SnabblePayExample/Views/CardView.swift

+9-11
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct CardView: View {
4949
Image(systemName: "qrcode")
5050
.resizable()
5151
.scaledToFit()
52-
.foregroundColor(colorScheme == .dark ? .white : .black)
52+
.foregroundColor(.secondary)
5353
}
5454
}
5555
var body: some View {
@@ -60,34 +60,32 @@ struct CardView: View {
6060
.padding([.top])
6161
.frame(width: toggleSize ? 160 : 60)
6262
Spacer()
63-
VStack(alignment: .leading, spacing: 8) {
63+
64+
VStack(alignment: .leading, spacing: 2) {
6465
Text(model.ibanString)
65-
.font(.headline)
66+
.font(.custom("Menlo", size: 16))
6667
.fontWeight(.bold)
6768
HStack {
6869
Text(model.account.holderName)
69-
.font(.caption)
7070
Spacer()
7171
if topAnimation {
7272
ZStack(alignment: .trailing) {
7373
Text(model.customName)
74-
.font(.caption)
7574
.opacity(opactiyOn)
7675
Text(model.account.bank)
77-
.font(.caption)
7876
.opacity(opactiyOff)
7977
}
78+
8079
} else {
8180
Text(expand || !model.hasCustomName ? model.account.bank : model.customName)
82-
.font(.caption)
8381
}
8482
}
85-
83+
.font(.caption)
8684
}
87-
.padding([.leading, .trailing])
88-
.padding([.bottom], model.autostart ? 16 : 8)
89-
.foregroundColor(model.autostart ? .primary : .secondary)
85+
.padding([.leading, .trailing], 20)
86+
.padding([.bottom], 10)
9087
}
88+
.foregroundColor(Color.black)
9189
.cardStyle(top: model.autostart)
9290
.onChange(of: scenePhase) { newPhase in
9391
guard model.autostart else {

0 commit comments

Comments
 (0)