File tree 1 file changed +10
-4
lines changed
ios/MullvadVPN/View controllers/Settings/SwiftUI components
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -29,25 +29,31 @@ struct SingleChoiceList<Item>: View where Item: Hashable {
29
29
func row( _ v: Item ) -> some View {
30
30
let isSelected = value. wrappedValue == v
31
31
return HStack {
32
- Image ( " IconTick " ) . opacity ( isSelected ? 1.0 : 0.0 )
32
+ Image ( uiImage: UIImage ( resource: . iconTick) ) . opacity ( isSelected ? 1.0 : 0.0 )
33
+ Spacer ( ) . frame ( width: UIMetrics . SettingsCell. selectableSettingsCellLeftViewSpacing)
33
34
Text ( verbatim: itemDescription ( v) )
34
35
Spacer ( )
35
36
}
36
- . padding ( 16 )
37
- . background ( isSelected ? Color ( UIColor . Cell. Background. selected) : Color ( UIColor . Cell. Background. normal) )
37
+ . padding ( EdgeInsets ( UIMetrics . SettingsCell. layoutMargins) )
38
+ . background (
39
+ isSelected
40
+ ? Color ( UIColor . Cell. Background. selected)
41
+ : Color ( UIColor . Cell. Background. indentationLevelOne)
42
+ )
38
43
. foregroundColor ( Color ( UIColor . Cell. titleTextColor) )
39
44
. onTapGesture {
40
45
value. wrappedValue = v
41
46
}
42
47
}
43
48
44
49
var body : some View {
45
- VStack ( spacing: 0 ) {
50
+ VStack ( spacing: UIMetrics . TableView . separatorHeight ) {
46
51
HStack {
47
52
Text ( title) . fontWeight ( . semibold)
48
53
Spacer ( )
49
54
}
50
55
. padding ( EdgeInsets ( UIMetrics . SettingsCell. layoutMargins) )
56
+ . background ( Color ( UIColor . Cell. Background. normal) )
51
57
ForEach ( options, id: \. self) { opt in
52
58
row ( opt)
53
59
}
You can’t perform that action at this time.
0 commit comments