summaryrefslogtreecommitdiffhomepage
path: root/ios
diff options
context:
space:
mode:
Diffstat (limited to 'ios')
-rw-r--r--ios/MullvadVPN/View controllers/RelayFilter/RelayFilterCellFactory.swift3
-rw-r--r--ios/MullvadVPN/View controllers/RelayFilter/RelayFilterViewController.swift3
-rw-r--r--ios/MullvadVPN/View controllers/SelectLocation/LocationDataSource.swift5
-rw-r--r--ios/MullvadVPN/View controllers/SelectLocation/LocationSectionHeaderFooterView.swift10
4 files changed, 8 insertions, 13 deletions
diff --git a/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterCellFactory.swift b/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterCellFactory.swift
index 1cc2a76f14..80eb58c550 100644
--- a/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterCellFactory.swift
+++ b/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterCellFactory.swift
@@ -64,7 +64,7 @@ struct RelayFilterCellFactory: @preconcurrency CellFactoryProtocol {
private func configureProviderCell(_ cell: CheckableSettingsCell?, item: RelayFilterDataSourceItem) {
guard let cell = cell else { return }
- let alpha = item.isEnabled ? 1.0 : 0.5
+ let alpha = item.isEnabled ? 1.0 : 0.2
cell.titleLabel.text = NSLocalizedString(
"RELAY_FILTER_CELL_LABEL",
@@ -84,7 +84,6 @@ struct RelayFilterCellFactory: @preconcurrency CellFactoryProtocol {
cell.setAccessibilityIdentifier(.relayFilterProviderCell)
cell.titleLabel.alpha = alpha
cell.detailTitleLabel.alpha = alpha
- cell.detailTitleLabel.textColor = cell.titleLabel.textColor
}
private func setFontWeight(_ weight: UIFont.Weight, to label: UILabel) {
diff --git a/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterViewController.swift b/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterViewController.swift
index 510b617f8f..5ff7700741 100644
--- a/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterViewController.swift
+++ b/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterViewController.swift
@@ -31,7 +31,7 @@ class RelayFilterViewController: UIViewController {
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
label.font = .preferredFont(forTextStyle: .body)
- label.textColor = .primaryTextColor
+ label.textColor = .secondaryTextColor
label.textAlignment = .center
return label
}()
@@ -110,7 +110,6 @@ class RelayFilterViewController: UIViewController {
.sink { [weak self] filter in
guard let self else { return }
let filterDescriptor = viewModel.getFilteredRelays(filter)
- descriptionLabel.alpha = filterDescriptor.isEnabled ? 1.0 : 0.5
applyButton.isEnabled = filterDescriptor.isEnabled
applyButton.setTitle(filterDescriptor.title, for: .normal)
descriptionLabel.text = filterDescriptor.description
diff --git a/ios/MullvadVPN/View controllers/SelectLocation/LocationDataSource.swift b/ios/MullvadVPN/View controllers/SelectLocation/LocationDataSource.swift
index f7b08ff63c..bbb4e1125c 100644
--- a/ios/MullvadVPN/View controllers/SelectLocation/LocationDataSource.swift
+++ b/ios/MullvadVPN/View controllers/SelectLocation/LocationDataSource.swift
@@ -277,7 +277,8 @@ extension LocationDataSource: UITableViewDelegate {
case .allLocations:
return LocationSectionHeaderFooterView(configuration: LocationSectionHeaderFooterView.Configuration(
name: LocationSection.allLocations.footer,
- style: .footer
+ style: .footer,
+ directionalEdgeInsets: NSDirectionalEdgeInsets(top: 24, leading: 16, bottom: 0, trailing: 16)
))
case .customLists:
return nil
@@ -287,7 +288,7 @@ extension LocationDataSource: UITableViewDelegate {
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
switch sections[section] {
case .allLocations:
- return dataSources[section].nodes.isEmpty ? 60.0 : .zero
+ return dataSources[section].nodes.isEmpty ? 80 : .zero
case .customLists:
return 24
}
diff --git a/ios/MullvadVPN/View controllers/SelectLocation/LocationSectionHeaderFooterView.swift b/ios/MullvadVPN/View controllers/SelectLocation/LocationSectionHeaderFooterView.swift
index 40775cbea2..0b6b443b5e 100644
--- a/ios/MullvadVPN/View controllers/SelectLocation/LocationSectionHeaderFooterView.swift
+++ b/ios/MullvadVPN/View controllers/SelectLocation/LocationSectionHeaderFooterView.swift
@@ -50,9 +50,8 @@ class LocationSectionHeaderFooterView: UIView, UIContentView {
init(configuration: Configuration) {
self.actualConfiguration = configuration
super.init(frame: .zero)
- applyAppearance()
- addSubviews()
apply(configuration: configuration)
+ addSubviews()
}
required init?(coder: NSCoder) {
@@ -64,7 +63,6 @@ class LocationSectionHeaderFooterView: UIView, UIContentView {
containerView.addArrangedSubview(actionButton)
addConstrainedSubviews([containerView]) {
containerView.pinEdgesToSuperviewMargins()
- actionButton.heightAnchor.constraint(equalTo: heightAnchor)
actionButton.widthAnchor.constraint(equalTo: actionButton.heightAnchor)
}
}
@@ -82,10 +80,7 @@ class LocationSectionHeaderFooterView: UIView, UIContentView {
actionButton.setAccessibilityIdentifier(.openCustomListsMenuButton)
actionButton.addAction(action, for: .touchUpInside)
}
- }
-
- private func applyAppearance() {
- directionalLayoutMargins = NSDirectionalEdgeInsets(top: 0, leading: 16, bottom: 0, trailing: 16)
+ directionalLayoutMargins = actualConfiguration.directionalEdgeInsets
}
}
@@ -114,6 +109,7 @@ extension LocationSectionHeaderFooterView {
struct Configuration: UIContentConfiguration, Equatable {
let name: String
let style: Style
+ var directionalEdgeInsets = NSDirectionalEdgeInsets(top: 0, leading: 16, bottom: 0, trailing: 16)
var primaryAction: UIAction?
func makeContentView() -> UIView & UIContentView {