Skip to content

Commit 29c9ca4

Browse files
author
Louise P
committed
[Update]: Change design of buttons
1 parent 16d02db commit 29c9ca4

File tree

2 files changed

+42
-10
lines changed

2 files changed

+42
-10
lines changed

Meep/Meep/Menu/KeysView.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,22 @@ struct KeysView: View {
4545
HStack(alignment: .center) {
4646
Text(touch.name)
4747
Spacer()
48-
Button(touch.touch, action: {
48+
Button(action: {
4949
changeKey(touch: touch.slug)
50+
}, label: {
51+
Text(touch.touch)
52+
.frame(width: 200, height: .none, alignment: .center)
53+
.padding(.all, 8)
54+
.foregroundColor(.white)
55+
.background(Color.gray)
56+
.cornerRadius(40)
5057
}).font(.title)
5158
}
5259
})
5360
if changeTouch {
5461
Text(self.textAlert)
5562
}
56-
}.frame(width: 400, height: .none, alignment: .center)
63+
}.frame(width: 600, height: .none, alignment: .center)
5764
.buttonStyle(PlainButtonStyle())
5865
Spacer()
5966

Meep/Meep/Menu/LanguageView.swift

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,46 @@ struct LanguageView: View {
4848
menuData.lang = "fr"
4949
UserDefaults.standard.setValue("fr", forKey: "Lang")
5050
self.en.toggle()
51-
}, label: {Text("Français")}).buttonStyle(PlainButtonStyle())
52-
if !en {
53-
Image(systemName: "checkmark")
54-
}
51+
}, label: {
52+
HStack(alignment: .center, spacing: 15) {
53+
Text("Français")
54+
if !en {
55+
Image(systemName: "checkmark")
56+
} else {
57+
Image(systemName: "multiply")
58+
}
59+
}.font(.title)
60+
.frame(width: 150, height: .none, alignment: .center)
61+
.padding(.all, 8)
62+
.foregroundColor(.white)
63+
.background(Color.gray)
64+
.cornerRadius(40)
65+
})
66+
.buttonStyle(PlainButtonStyle())
67+
5568
}
5669

5770
HStack(alignment: .center) {
5871
Button(action: {
5972
menuData.lang = "en"
6073
UserDefaults.standard.setValue("en", forKey: "Lang")
6174
self.en.toggle()
62-
}, label: {Text("English")}).buttonStyle(PlainButtonStyle())
63-
if en {
64-
Image(systemName: "checkmark")
65-
}
75+
}, label: {
76+
HStack(alignment: .center, spacing: 15) {
77+
Text("English")
78+
if en {
79+
Image(systemName: "checkmark")
80+
} else {
81+
Image(systemName: "multiply")
82+
}
83+
}.font(.title)
84+
.frame(width: 150, height: .none, alignment: .center)
85+
.padding(.all, 8)
86+
.foregroundColor(.white)
87+
.background(Color.gray)
88+
.cornerRadius(40)
89+
})
90+
.buttonStyle(PlainButtonStyle())
6691
}
6792
}.frame(width: 400, height: .none, alignment: .center)
6893

0 commit comments

Comments
 (0)