Update(NewDesign): fix color

pull/24/head
Louis DUFOUR 10 months ago
parent 1b24b1fe9e
commit 6f27681e17

@ -9,6 +9,7 @@ import SwiftUI
struct ItemCollectionParty: View {
var party: Party
@Environment(\.colorScheme) var colorScheme
var body: some View {
VStack {
@ -22,19 +23,21 @@ struct ItemCollectionParty: View {
HStack(spacing: 10) {
HStack {
ProfileComponent(color: Color.purple, profileWidth: 60, profileHeight: 60, image: Image(party.player1Image))
ProfileComponent(color: Color.white, profileWidth: 60, profileHeight: 60, image: Image(party.player1Image))
VStack(alignment: .leading) {
Text(party.player1Name)
.fontWeight(.bold)
.foregroundColor(.purple)
.foregroundColor(colorScheme == .dark ? .white : .primary)
.lineLimit(1)
.minimumScaleFactor(0.5)
.frame(maxWidth: .infinity, alignment: .leading)
Text(LocalizedStringKey(party.player1Score))
.fontWeight(.bold)
.foregroundColor(party.player1Score == "Défaite" ? .red : .green) // Défaite en rouge, Victoire en vert
.foregroundColor(party.player1Score == "Défaite" ? .red : .green)
.lineLimit(1)
.minimumScaleFactor(0.5)
}
}
@ -46,23 +49,25 @@ struct ItemCollectionParty: View {
VStack(alignment: .trailing) {
Text(party.player2Name)
.fontWeight(.bold)
.foregroundColor(.purple)
.foregroundColor(colorScheme == .dark ? .white : .primary)
.lineLimit(1)
.minimumScaleFactor(0.5)
.frame(maxWidth: .infinity, alignment: .trailing)
Text(LocalizedStringKey(party.player2Score))
.fontWeight(.bold)
.foregroundColor(party.player2Score == "Victoire" ? .green : .red) // Victoire en vert, Défaite en rouge
.foregroundColor(party.player2Score == "Victoire" ? .green : .red)
.lineLimit(1)
.minimumScaleFactor(0.5)
}
ProfileComponent(color: Color.purple, profileWidth: 60, profileHeight: 60, image: Image(party.player2Image))
ProfileComponent(color: Color.white, profileWidth: 60, profileHeight: 60, image: Image(party.player2Image))
}
}
.padding()
.background(Color(UIColor.systemBackground))
.cornerRadius(15)
.shadow(radius: 3) // Réduction de l'ombre pour un effet plus léger
.shadow(radius: 3)
}
.padding(.horizontal)
}

@ -21,7 +21,14 @@ struct PartyListView: View {
.padding(.vertical, 5)
.listRowInsets(EdgeInsets()) // Supprimer le padding
}
.navigationTitle(LocalizedStringKey("Liste des Parties"))
.navigationTitle("")
.toolbar {
ToolbarItem(placement: .principal) {
Text("Liste des Parties")
.font(.custom("Nuku Nuku", size: 24)) // Appliquer la police personnalisée ici
.foregroundColor(.primary) // Ajustez la couleur selon vos besoins
}
}
.frame(maxWidth: .infinity) // Utiliser toute la largeur disponible
}
}

Loading…
Cancel
Save