Skip to content

Commit 2a9e656

Browse files
committed
Apply changes from PR
1 parent 590a240 commit 2a9e656

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

ios/MullvadVPN/View controllers/Settings/SwiftUI components/SingleChoiceList.swift

+10-4
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,31 @@ struct SingleChoiceList<Item>: View where Item: Hashable {
2929
func row(_ v: Item) -> some View {
3030
let isSelected = value.wrappedValue == v
3131
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)
3334
Text(verbatim: itemDescription(v))
3435
Spacer()
3536
}
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+
)
3843
.foregroundColor(Color(UIColor.Cell.titleTextColor))
3944
.onTapGesture {
4045
value.wrappedValue = v
4146
}
4247
}
4348

4449
var body: some View {
45-
VStack(spacing: 0) {
50+
VStack(spacing: UIMetrics.TableView.separatorHeight) {
4651
HStack {
4752
Text(title).fontWeight(.semibold)
4853
Spacer()
4954
}
5055
.padding(EdgeInsets(UIMetrics.SettingsCell.layoutMargins))
56+
.background(Color(UIColor.Cell.Background.normal))
5157
ForEach(options, id: \.self) { opt in
5258
row(opt)
5359
}

0 commit comments

Comments
 (0)