summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2021-11-22 10:43:21 +0100
committerAndrej Mihajlov <and@mullvad.net>2021-11-22 10:43:21 +0100
commit414caa97a749b0b7debe1dbb2361c6ce404be8dd (patch)
treea5e2258e706c0eb56a08444ef5a50b5222412535
parent200364c71f3495a8d33c3517118e4a5c2eba7432 (diff)
parenta77ae5bd9c250c503430d74a5ecdb286102ed2e3 (diff)
downloadmullvadvpn-414caa97a749b0b7debe1dbb2361c6ce404be8dd.tar.xz
mullvadvpn-414caa97a749b0b7debe1dbb2361c6ce404be8dd.zip
Merge branch 'new-svg-logo'
-rw-r--r--ios/MullvadVPN.xcodeproj/project.pbxproj4
-rw-r--r--ios/MullvadVPN/AccountViewController.swift4
-rw-r--r--ios/MullvadVPN/Assets.xcassets/Contents.json6
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconAlert.imageset/IconAlert.pdfbin1072 -> 0 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconArrow.imageset/IconArrow.pdfbin1107 -> 1103 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconBack.imageset/IconBack.pdfbin1131 -> 1123 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconChevron.imageset/IconChevron.pdf6
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconChevronDown.imageset/IconChevronDown.pdf6
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconChevronUp.imageset/IconChevronUp.pdfbin1063 -> 1059 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconClose.imageset/Contents.json15
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconClose.imageset/IconClose.pdfbin1136 -> 0 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconCloseSml.imageset/Contents.json15
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconCloseSml.imageset/IconCloseSml.pdfbin1141 -> 0 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconExtlink.imageset/IconExtlink.pdfbin1128 -> 1124 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconFail.imageset/IconFail.pdfbin1165 -> 1161 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconFastest.imageset/Contents.json15
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconFastest.imageset/IconFastest.pdfbin1686 -> 0 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconNearest.imageset/Contents.json15
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconNearest.imageset/IconNearest.pdfbin1227 -> 0 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconReload.imageset/IconReload.pdf6
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconSettings.imageset/IconSettings.pdfbin1407 -> 1399 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconSpinner.imageset/IconSpinner.pdf6
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconSuccess.imageset/IconSuccess.pdf6
-rw-r--r--ios/MullvadVPN/Assets.xcassets/IconTick.imageset/IconTick.pdf6
-rw-r--r--ios/MullvadVPN/Assets.xcassets/LocationMarkerSecure.imageset/LocationMarkerSecure.pdfbin2409 -> 2405 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/LocationMarkerUnsecure.imageset/LocationMarkerUnsecure.pdfbin2407 -> 2403 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/LogoIcon.imageset/LogoIcon.pdfbin3061 -> 3057 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/LogoText.imageset/Contents.json (renamed from ios/MullvadVPN/Assets.xcassets/IconAlert.imageset/Contents.json)10
-rw-r--r--ios/MullvadVPN/Assets.xcassets/LogoText.imageset/LogoText.pdfbin0 -> 2742 bytes
-rw-r--r--ios/MullvadVPN/Assets.xcassets/Palette/Contents.json6
-rw-r--r--ios/MullvadVPN/Assets.xcassets/Palette/Danger.colorset/Contents.json20
-rw-r--r--ios/MullvadVPN/Assets.xcassets/Palette/Primary.colorset/Contents.json20
-rw-r--r--ios/MullvadVPN/Assets.xcassets/Palette/Secondary.colorset/Contents.json20
-rw-r--r--ios/MullvadVPN/Assets.xcassets/Palette/SubCell.colorset/Contents.json20
-rw-r--r--ios/MullvadVPN/Assets.xcassets/Palette/SubSubCell.colorset/Contents.json20
-rw-r--r--ios/MullvadVPN/Assets.xcassets/Palette/Success.colorset/Contents.json20
-rw-r--r--ios/MullvadVPN/Assets.xcassets/Palette/Warning.colorset/Contents.json20
-rw-r--r--ios/MullvadVPN/CustomNavigationBar.swift39
-rw-r--r--ios/MullvadVPN/HeaderBarView.swift39
-rw-r--r--ios/MullvadVPN/NotificationBannerView.swift4
-rw-r--r--ios/MullvadVPN/PreferencesViewController.swift4
-rw-r--r--ios/MullvadVPN/ProblemReportViewController.swift4
-rw-r--r--ios/MullvadVPN/SettingsAccountCell.swift4
-rw-r--r--ios/MullvadVPN/SettingsCell.swift49
-rw-r--r--ios/MullvadVPN/SettingsDataSource.swift10
-rw-r--r--ios/MullvadVPN/SettingsViewController.swift4
-rw-r--r--ios/MullvadVPN/UIColor+Palette.swift39
-rw-r--r--ios/MullvadVPN/UIImage+TintColor.swift34
-rw-r--r--ios/MullvadVPN/WireguardKeysViewController.swift4
-rwxr-xr-xios/convert-assets.rb25
50 files changed, 195 insertions, 330 deletions
diff --git a/ios/MullvadVPN.xcodeproj/project.pbxproj b/ios/MullvadVPN.xcodeproj/project.pbxproj
index c8c259d5ae..8ddd24c52d 100644
--- a/ios/MullvadVPN.xcodeproj/project.pbxproj
+++ b/ios/MullvadVPN.xcodeproj/project.pbxproj
@@ -113,6 +113,7 @@
5850368D25A49E2200A43E93 /* PrivateKeyWithMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58C6B35322BB87C4003C19AD /* PrivateKeyWithMetadata.swift */; };
58561C99239A5D1500BD6B5E /* IPEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58561C98239A5D1500BD6B5E /* IPEndpoint.swift */; };
58561C9A239A5D1500BD6B5E /* IPEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58561C98239A5D1500BD6B5E /* IPEndpoint.swift */; };
+ 5856D13727450A8A00DFD627 /* UIImage+TintColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5856D13627450A8A00DFD627 /* UIImage+TintColor.swift */; };
5857F23024C843ED00CF6F47 /* ChainedError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58F840B12464491D0044E708 /* ChainedError.swift */; };
5857F23424C8443700CF6F47 /* AsyncOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E973DD24850EB600096F90 /* AsyncOperation.swift */; };
5857F23824C8446700CF6F47 /* AsyncBlockOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 580EE22324B3243100F9D8A1 /* AsyncBlockOperation.swift */; };
@@ -413,6 +414,7 @@
584D26C5270C8741004EA533 /* SettingsDNSTextCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsDNSTextCell.swift; sourceTree = "<group>"; };
5850366725A47AC700A43E93 /* IPAddressRange+Codable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "IPAddressRange+Codable.swift"; sourceTree = "<group>"; };
58561C98239A5D1500BD6B5E /* IPEndpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IPEndpoint.swift; sourceTree = "<group>"; };
+ 5856D13627450A8A00DFD627 /* UIImage+TintColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+TintColor.swift"; sourceTree = "<group>"; };
5857F24224C8662600CF6F47 /* SelectLocationHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectLocationHeaderView.swift; sourceTree = "<group>"; };
5857F24624C882D700CF6F47 /* SelectLocationNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectLocationNavigationController.swift; sourceTree = "<group>"; };
585CA70E25F8C44600B47C62 /* UIMetrics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIMetrics.swift; sourceTree = "<group>"; };
@@ -910,6 +912,7 @@
5891BF5025E66B1E006D6FB0 /* UIBarButtonItem+KeyboardNavigation.swift */,
587CBFE222807F530028DED3 /* UIColor+Helpers.swift */,
58CCA0152242560B004F3011 /* UIColor+Palette.swift */,
+ 5856D13627450A8A00DFD627 /* UIImage+TintColor.swift */,
585CA70E25F8C44600B47C62 /* UIMetrics.swift */,
58FD5BF12424F7D700112C88 /* UserInterfaceInteractionRestriction.swift */,
58B8743122B25A7600015324 /* WireguardAssociatedAddresses.swift */,
@@ -1327,6 +1330,7 @@
5846227326E22A160035F7C2 /* AppStorePaymentObserver.swift in Sources */,
58FAEDEF245069C700CB0F5B /* KeychainAttributes.swift in Sources */,
585DA87A26B024F900B8C587 /* RelayCacheError.swift in Sources */,
+ 5856D13727450A8A00DFD627 /* UIImage+TintColor.swift in Sources */,
58CB0EE024B86751001EF0D8 /* RESTClient.swift in Sources */,
5846226A26E0E6FA0035F7C2 /* ReceiptRefreshOperation.swift in Sources */,
58293FB125124117005D0BB5 /* CustomTextField.swift in Sources */,
diff --git a/ios/MullvadVPN/AccountViewController.swift b/ios/MullvadVPN/AccountViewController.swift
index 923e004dc7..bb1ff3b62f 100644
--- a/ios/MullvadVPN/AccountViewController.swift
+++ b/ios/MullvadVPN/AccountViewController.swift
@@ -51,6 +51,10 @@ class AccountViewController: UIViewController, AppStorePaymentObserver, AccountO
// MARK: - View lifecycle
+ override var preferredStatusBarStyle: UIStatusBarStyle {
+ return .lightContent
+ }
+
override func viewDidLoad() {
super.viewDidLoad()
diff --git a/ios/MullvadVPN/Assets.xcassets/Contents.json b/ios/MullvadVPN/Assets.xcassets/Contents.json
index da4a164c91..73c00596a7 100644
--- a/ios/MullvadVPN/Assets.xcassets/Contents.json
+++ b/ios/MullvadVPN/Assets.xcassets/Contents.json
@@ -1,6 +1,6 @@
{
"info" : {
- "version" : 1,
- "author" : "xcode"
+ "author" : "xcode",
+ "version" : 1
}
-} \ No newline at end of file
+}
diff --git a/ios/MullvadVPN/Assets.xcassets/IconAlert.imageset/IconAlert.pdf b/ios/MullvadVPN/Assets.xcassets/IconAlert.imageset/IconAlert.pdf
deleted file mode 100644
index 93a79619f3..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/IconAlert.imageset/IconAlert.pdf
+++ /dev/null
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/IconArrow.imageset/IconArrow.pdf b/ios/MullvadVPN/Assets.xcassets/IconArrow.imageset/IconArrow.pdf
index 8ed65412c9..0476e39b57 100644
--- a/ios/MullvadVPN/Assets.xcassets/IconArrow.imageset/IconArrow.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/IconArrow.imageset/IconArrow.pdf
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/IconBack.imageset/IconBack.pdf b/ios/MullvadVPN/Assets.xcassets/IconBack.imageset/IconBack.pdf
index 980b2e9b32..9b4b57c821 100644
--- a/ios/MullvadVPN/Assets.xcassets/IconBack.imageset/IconBack.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/IconBack.imageset/IconBack.pdf
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/IconChevron.imageset/IconChevron.pdf b/ios/MullvadVPN/Assets.xcassets/IconChevron.imageset/IconChevron.pdf
index 19e3cdbf05..db695a81e0 100644
--- a/ios/MullvadVPN/Assets.xcassets/IconChevron.imageset/IconChevron.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/IconChevron.imageset/IconChevron.pdf
@@ -42,7 +42,7 @@ endobj
endobj
6 0 obj
<< /Producer (cairo 1.16.0 (https://cairographics.org))
- /CreationDate (D:20200401142059+02'00)
+ /CreationDate (20200729113941+01')
>>
endobj
7 0 obj
@@ -59,12 +59,12 @@ xref
0000000015 00000 n
0000000273 00000 n
0000000647 00000 n
-0000000763 00000 n
+0000000759 00000 n
trailer
<< /Size 8
/Root 7 0 R
/Info 6 0 R
>>
startxref
-815
+811
%%EOF
diff --git a/ios/MullvadVPN/Assets.xcassets/IconChevronDown.imageset/IconChevronDown.pdf b/ios/MullvadVPN/Assets.xcassets/IconChevronDown.imageset/IconChevronDown.pdf
index 55d353ac95..803fe79fbd 100644
--- a/ios/MullvadVPN/Assets.xcassets/IconChevronDown.imageset/IconChevronDown.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/IconChevronDown.imageset/IconChevronDown.pdf
@@ -41,7 +41,7 @@ endobj
endobj
6 0 obj
<< /Producer (cairo 1.16.0 (https://cairographics.org))
- /CreationDate (D:20200401142059+02'00)
+ /CreationDate (20200729113941+01')
>>
endobj
7 0 obj
@@ -58,12 +58,12 @@ xref
0000000015 00000 n
0000000277 00000 n
0000000652 00000 n
-0000000768 00000 n
+0000000764 00000 n
trailer
<< /Size 8
/Root 7 0 R
/Info 6 0 R
>>
startxref
-820
+816
%%EOF
diff --git a/ios/MullvadVPN/Assets.xcassets/IconChevronUp.imageset/IconChevronUp.pdf b/ios/MullvadVPN/Assets.xcassets/IconChevronUp.imageset/IconChevronUp.pdf
index 35e04ce766..d4d1d23918 100644
--- a/ios/MullvadVPN/Assets.xcassets/IconChevronUp.imageset/IconChevronUp.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/IconChevronUp.imageset/IconChevronUp.pdf
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/IconClose.imageset/Contents.json b/ios/MullvadVPN/Assets.xcassets/IconClose.imageset/Contents.json
deleted file mode 100644
index 1c86538987..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/IconClose.imageset/Contents.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "IconClose.pdf"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- },
- "properties" : {
- "preserves-vector-representation" : true
- }
-} \ No newline at end of file
diff --git a/ios/MullvadVPN/Assets.xcassets/IconClose.imageset/IconClose.pdf b/ios/MullvadVPN/Assets.xcassets/IconClose.imageset/IconClose.pdf
deleted file mode 100644
index 8d82b9acc9..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/IconClose.imageset/IconClose.pdf
+++ /dev/null
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/IconCloseSml.imageset/Contents.json b/ios/MullvadVPN/Assets.xcassets/IconCloseSml.imageset/Contents.json
deleted file mode 100644
index 8054dc854b..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/IconCloseSml.imageset/Contents.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "IconCloseSml.pdf"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- },
- "properties" : {
- "preserves-vector-representation" : true
- }
-} \ No newline at end of file
diff --git a/ios/MullvadVPN/Assets.xcassets/IconCloseSml.imageset/IconCloseSml.pdf b/ios/MullvadVPN/Assets.xcassets/IconCloseSml.imageset/IconCloseSml.pdf
deleted file mode 100644
index d6260c1f98..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/IconCloseSml.imageset/IconCloseSml.pdf
+++ /dev/null
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/IconExtlink.imageset/IconExtlink.pdf b/ios/MullvadVPN/Assets.xcassets/IconExtlink.imageset/IconExtlink.pdf
index 757d079901..918fac610a 100644
--- a/ios/MullvadVPN/Assets.xcassets/IconExtlink.imageset/IconExtlink.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/IconExtlink.imageset/IconExtlink.pdf
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/IconFail.imageset/IconFail.pdf b/ios/MullvadVPN/Assets.xcassets/IconFail.imageset/IconFail.pdf
index 341f7c7604..65f239e175 100644
--- a/ios/MullvadVPN/Assets.xcassets/IconFail.imageset/IconFail.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/IconFail.imageset/IconFail.pdf
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/IconFastest.imageset/Contents.json b/ios/MullvadVPN/Assets.xcassets/IconFastest.imageset/Contents.json
deleted file mode 100644
index b1383ae268..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/IconFastest.imageset/Contents.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "IconFastest.pdf"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- },
- "properties" : {
- "preserves-vector-representation" : true
- }
-} \ No newline at end of file
diff --git a/ios/MullvadVPN/Assets.xcassets/IconFastest.imageset/IconFastest.pdf b/ios/MullvadVPN/Assets.xcassets/IconFastest.imageset/IconFastest.pdf
deleted file mode 100644
index e2cccf59b5..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/IconFastest.imageset/IconFastest.pdf
+++ /dev/null
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/IconNearest.imageset/Contents.json b/ios/MullvadVPN/Assets.xcassets/IconNearest.imageset/Contents.json
deleted file mode 100644
index 1a4836090c..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/IconNearest.imageset/Contents.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "IconNearest.pdf"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- },
- "properties" : {
- "preserves-vector-representation" : true
- }
-} \ No newline at end of file
diff --git a/ios/MullvadVPN/Assets.xcassets/IconNearest.imageset/IconNearest.pdf b/ios/MullvadVPN/Assets.xcassets/IconNearest.imageset/IconNearest.pdf
deleted file mode 100644
index 40b6736680..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/IconNearest.imageset/IconNearest.pdf
+++ /dev/null
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/IconReload.imageset/IconReload.pdf b/ios/MullvadVPN/Assets.xcassets/IconReload.imageset/IconReload.pdf
index dd17312eec..0cedf546e4 100644
--- a/ios/MullvadVPN/Assets.xcassets/IconReload.imageset/IconReload.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/IconReload.imageset/IconReload.pdf
@@ -43,7 +43,7 @@ endobj
endobj
6 0 obj
<< /Producer (cairo 1.16.0 (https://cairographics.org))
- /CreationDate (D:20200723135151+03'00)
+ /CreationDate (20200729113941+01')
>>
endobj
7 0 obj
@@ -60,12 +60,12 @@ xref
0000000015 00000 n
0000000452 00000 n
0000000829 00000 n
-0000000945 00000 n
+0000000941 00000 n
trailer
<< /Size 8
/Root 7 0 R
/Info 6 0 R
>>
startxref
-997
+993
%%EOF
diff --git a/ios/MullvadVPN/Assets.xcassets/IconSettings.imageset/IconSettings.pdf b/ios/MullvadVPN/Assets.xcassets/IconSettings.imageset/IconSettings.pdf
index b17cda0023..3f2ef14157 100644
--- a/ios/MullvadVPN/Assets.xcassets/IconSettings.imageset/IconSettings.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/IconSettings.imageset/IconSettings.pdf
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/IconSpinner.imageset/IconSpinner.pdf b/ios/MullvadVPN/Assets.xcassets/IconSpinner.imageset/IconSpinner.pdf
index 5b915cf5ad..95b6d6b73d 100644
--- a/ios/MullvadVPN/Assets.xcassets/IconSpinner.imageset/IconSpinner.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/IconSpinner.imageset/IconSpinner.pdf
@@ -43,7 +43,7 @@ endobj
endobj
6 0 obj
<< /Producer (cairo 1.16.0 (https://cairographics.org))
- /CreationDate (D:20200401142100+02'00)
+ /CreationDate (20200729113941+01')
>>
endobj
7 0 obj
@@ -60,12 +60,12 @@ xref
0000000015 00000 n
0000000498 00000 n
0000000905 00000 n
-0000001021 00000 n
+0000001017 00000 n
trailer
<< /Size 8
/Root 7 0 R
/Info 6 0 R
>>
startxref
-1073
+1069
%%EOF
diff --git a/ios/MullvadVPN/Assets.xcassets/IconSuccess.imageset/IconSuccess.pdf b/ios/MullvadVPN/Assets.xcassets/IconSuccess.imageset/IconSuccess.pdf
index 3a21420319..b1fa595f75 100644
--- a/ios/MullvadVPN/Assets.xcassets/IconSuccess.imageset/IconSuccess.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/IconSuccess.imageset/IconSuccess.pdf
@@ -40,7 +40,7 @@ endobj
endobj
6 0 obj
<< /Producer (cairo 1.16.0 (https://cairographics.org))
- /CreationDate (D:20200401142100+02'00)
+ /CreationDate (20200729113941+01')
>>
endobj
7 0 obj
@@ -57,12 +57,12 @@ xref
0000000015 00000 n
0000000322 00000 n
0000000697 00000 n
-0000000813 00000 n
+0000000809 00000 n
trailer
<< /Size 8
/Root 7 0 R
/Info 6 0 R
>>
startxref
-865
+861
%%EOF
diff --git a/ios/MullvadVPN/Assets.xcassets/IconTick.imageset/IconTick.pdf b/ios/MullvadVPN/Assets.xcassets/IconTick.imageset/IconTick.pdf
index 072e04a937..70c7095ab3 100644
--- a/ios/MullvadVPN/Assets.xcassets/IconTick.imageset/IconTick.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/IconTick.imageset/IconTick.pdf
@@ -42,7 +42,7 @@ endobj
endobj
6 0 obj
<< /Producer (cairo 1.16.0 (https://cairographics.org))
- /CreationDate (D:20200401142100+02'00)
+ /CreationDate (20200729113941+01')
>>
endobj
7 0 obj
@@ -59,12 +59,12 @@ xref
0000000015 00000 n
0000000268 00000 n
0000000643 00000 n
-0000000759 00000 n
+0000000755 00000 n
trailer
<< /Size 8
/Root 7 0 R
/Info 6 0 R
>>
startxref
-811
+807
%%EOF
diff --git a/ios/MullvadVPN/Assets.xcassets/LocationMarkerSecure.imageset/LocationMarkerSecure.pdf b/ios/MullvadVPN/Assets.xcassets/LocationMarkerSecure.imageset/LocationMarkerSecure.pdf
index 37598ad995..7da89ac1fd 100644
--- a/ios/MullvadVPN/Assets.xcassets/LocationMarkerSecure.imageset/LocationMarkerSecure.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/LocationMarkerSecure.imageset/LocationMarkerSecure.pdf
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/LocationMarkerUnsecure.imageset/LocationMarkerUnsecure.pdf b/ios/MullvadVPN/Assets.xcassets/LocationMarkerUnsecure.imageset/LocationMarkerUnsecure.pdf
index da2e87e4fd..0e87b6ec41 100644
--- a/ios/MullvadVPN/Assets.xcassets/LocationMarkerUnsecure.imageset/LocationMarkerUnsecure.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/LocationMarkerUnsecure.imageset/LocationMarkerUnsecure.pdf
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/LogoIcon.imageset/LogoIcon.pdf b/ios/MullvadVPN/Assets.xcassets/LogoIcon.imageset/LogoIcon.pdf
index 87f35ecae0..1846892f30 100644
--- a/ios/MullvadVPN/Assets.xcassets/LogoIcon.imageset/LogoIcon.pdf
+++ b/ios/MullvadVPN/Assets.xcassets/LogoIcon.imageset/LogoIcon.pdf
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/IconAlert.imageset/Contents.json b/ios/MullvadVPN/Assets.xcassets/LogoText.imageset/Contents.json
index e63f9e602d..7582073b99 100644
--- a/ios/MullvadVPN/Assets.xcassets/IconAlert.imageset/Contents.json
+++ b/ios/MullvadVPN/Assets.xcassets/LogoText.imageset/Contents.json
@@ -1,15 +1,15 @@
{
"images" : [
{
- "idiom" : "universal",
- "filename" : "IconAlert.pdf"
+ "filename" : "LogoText.pdf",
+ "idiom" : "universal"
}
],
"info" : {
- "version" : 1,
- "author" : "xcode"
+ "author" : "xcode",
+ "version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
-} \ No newline at end of file
+}
diff --git a/ios/MullvadVPN/Assets.xcassets/LogoText.imageset/LogoText.pdf b/ios/MullvadVPN/Assets.xcassets/LogoText.imageset/LogoText.pdf
new file mode 100644
index 0000000000..e00c9c6c4d
--- /dev/null
+++ b/ios/MullvadVPN/Assets.xcassets/LogoText.imageset/LogoText.pdf
Binary files differ
diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/Contents.json
deleted file mode 100644
index 73c00596a7..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/Palette/Contents.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/Danger.colorset/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/Danger.colorset/Contents.json
deleted file mode 100644
index 5fcc3ce628..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/Palette/Danger.colorset/Contents.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "info" : {
- "version" : 1,
- "author" : "xcode"
- },
- "colors" : [
- {
- "idiom" : "universal",
- "color" : {
- "color-space" : "srgb",
- "components" : {
- "red" : "227",
- "alpha" : "1.000",
- "blue" : "57",
- "green" : "64"
- }
- }
- }
- ]
-} \ No newline at end of file
diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/Primary.colorset/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/Primary.colorset/Contents.json
deleted file mode 100644
index 2533ad0ffd..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/Palette/Primary.colorset/Contents.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "info" : {
- "version" : 1,
- "author" : "xcode"
- },
- "colors" : [
- {
- "idiom" : "universal",
- "color" : {
- "color-space" : "srgb",
- "components" : {
- "red" : "41",
- "alpha" : "1.000",
- "blue" : "115",
- "green" : "77"
- }
- }
- }
- ]
-} \ No newline at end of file
diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/Secondary.colorset/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/Secondary.colorset/Contents.json
deleted file mode 100644
index 27f9ef24d4..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/Palette/Secondary.colorset/Contents.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "info" : {
- "version" : 1,
- "author" : "xcode"
- },
- "colors" : [
- {
- "idiom" : "universal",
- "color" : {
- "color-space" : "srgb",
- "components" : {
- "red" : "25",
- "alpha" : "1.000",
- "blue" : "69",
- "green" : "46"
- }
- }
- }
- ]
-} \ No newline at end of file
diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/SubCell.colorset/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/SubCell.colorset/Contents.json
deleted file mode 100644
index efc24fc618..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/Palette/SubCell.colorset/Contents.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "info" : {
- "version" : 1,
- "author" : "xcode"
- },
- "colors" : [
- {
- "idiom" : "universal",
- "color" : {
- "color-space" : "srgb",
- "components" : {
- "red" : "38",
- "alpha" : "1.000",
- "blue" : "84",
- "green" : "59"
- }
- }
- }
- ]
-} \ No newline at end of file
diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/SubSubCell.colorset/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/SubSubCell.colorset/Contents.json
deleted file mode 100644
index f536c14f4f..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/Palette/SubSubCell.colorset/Contents.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "info" : {
- "version" : 1,
- "author" : "xcode"
- },
- "colors" : [
- {
- "idiom" : "universal",
- "color" : {
- "color-space" : "srgb",
- "components" : {
- "red" : "33",
- "alpha" : "1.000",
- "blue" : "77",
- "green" : "51"
- }
- }
- }
- ]
-} \ No newline at end of file
diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/Success.colorset/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/Success.colorset/Contents.json
deleted file mode 100644
index 48c2ae1230..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/Palette/Success.colorset/Contents.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "info" : {
- "version" : 1,
- "author" : "xcode"
- },
- "colors" : [
- {
- "idiom" : "universal",
- "color" : {
- "color-space" : "srgb",
- "components" : {
- "red" : "68",
- "alpha" : "1.000",
- "blue" : "77",
- "green" : "173"
- }
- }
- }
- ]
-} \ No newline at end of file
diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/Warning.colorset/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/Warning.colorset/Contents.json
deleted file mode 100644
index b47d81baa2..0000000000
--- a/ios/MullvadVPN/Assets.xcassets/Palette/Warning.colorset/Contents.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "colors" : [
- {
- "color" : {
- "color-space" : "srgb",
- "components" : {
- "alpha" : "1.000",
- "blue" : "0.141",
- "green" : "0.835",
- "red" : "1.000"
- }
- },
- "idiom" : "universal"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
diff --git a/ios/MullvadVPN/CustomNavigationBar.swift b/ios/MullvadVPN/CustomNavigationBar.swift
index 4268a45d72..7f27dbe7c6 100644
--- a/ios/MullvadVPN/CustomNavigationBar.swift
+++ b/ios/MullvadVPN/CustomNavigationBar.swift
@@ -9,17 +9,27 @@
import UIKit
class CustomNavigationBar: UINavigationBar {
+ private static let titleTextAttributes: [NSAttributedString.Key: Any] = [
+ .foregroundColor: UIColor.NavigationBar.titleColor
+ ]
+
+ private static let backButtonTitlePositionOffset = UIOffset(horizontal: 4, vertical: 0)
+ private static let backButtonTitleTextAttributes: [NSAttributedString.Key: Any] = [
+ .foregroundColor: UIColor.NavigationBar.backButtonTitleColor
+ ]
private static let setupAppearanceForIOS12Once: Void = {
if #available(iOS 13, *) {
// no-op
} else {
let buttonAppearance = UIBarButtonItem.appearance(whenContainedInInstancesOf: [CustomNavigationBar.self])
- buttonAppearance.setBackButtonTitlePositionAdjustment(UIOffset(horizontal: 4, vertical: 0), for: .default)
+ buttonAppearance.setBackButtonTitlePositionAdjustment(CustomNavigationBar.backButtonTitlePositionOffset, for: .default)
+ buttonAppearance.setTitleTextAttributes(CustomNavigationBar.titleTextAttributes, for: .normal)
}
}()
- private let customBackIndicatorImage = UIImage(named: "IconBack")
+ private let customBackIndicatorImage = UIImage(named: "IconBack")?
+ .backport_withTintColor(UIColor.NavigationBar.backButtonIndicatorColor, renderingMode: .alwaysOriginal)
private let customBackIndicatorTransitionMask = UIImage(named: "IconBackTransitionMask")
// Returns the distance from the title label to the bottom of navigation bar
@@ -59,8 +69,8 @@ class CustomNavigationBar: UINavigationBar {
}
private func setupNavigationBarAppearance() {
- tintColor = .white
- backgroundColor = .secondaryColor
+ tintColor = UIColor.NavigationBar.titleColor
+ backgroundColor = UIColor.NavigationBar.backgroundColor
isTranslucent = false
if #available(iOS 13, *) {
@@ -69,33 +79,30 @@ class CustomNavigationBar: UINavigationBar {
} else {
backIndicatorImage = customBackIndicatorImage
backIndicatorTransitionMaskImage = customBackIndicatorTransitionMask
- barTintColor = .secondaryColor
+ barTintColor = UIColor.NavigationBar.backgroundColor
- let titleAttributes: [NSAttributedString.Key: Any] = [.foregroundColor: UIColor.white]
- titleTextAttributes = titleAttributes
- largeTitleTextAttributes = titleAttributes
+ titleTextAttributes = Self.titleTextAttributes
+ largeTitleTextAttributes = Self.titleTextAttributes
shadowImage = UIImage()
}
}
@available(iOS 13, *)
private func makeNavigationBarAppearance() -> UINavigationBarAppearance {
- let textAttributes: [NSAttributedString.Key: Any] = [.foregroundColor: UIColor.white]
-
let navigationBarAppearance = UINavigationBarAppearance()
navigationBarAppearance.configureWithTransparentBackground()
- navigationBarAppearance.titleTextAttributes = textAttributes
- navigationBarAppearance.largeTitleTextAttributes = textAttributes
+ navigationBarAppearance.titleTextAttributes = Self.titleTextAttributes
+ navigationBarAppearance.largeTitleTextAttributes = Self.titleTextAttributes
let plainBarButtonAppearance = UIBarButtonItemAppearance(style: .plain)
- plainBarButtonAppearance.normal.titleTextAttributes = textAttributes
+ plainBarButtonAppearance.normal.titleTextAttributes = Self.titleTextAttributes
let doneBarButtonAppearance = UIBarButtonItemAppearance(style: .done)
- doneBarButtonAppearance.normal.titleTextAttributes = textAttributes
+ doneBarButtonAppearance.normal.titleTextAttributes = Self.titleTextAttributes
let backButtonAppearance = UIBarButtonItemAppearance(style: .plain)
- backButtonAppearance.normal.titleTextAttributes = textAttributes
- backButtonAppearance.normal.titlePositionAdjustment = UIOffset(horizontal: 4, vertical: 0)
+ backButtonAppearance.normal.titlePositionAdjustment = Self.backButtonTitlePositionOffset
+ backButtonAppearance.normal.titleTextAttributes = Self.backButtonTitleTextAttributes
navigationBarAppearance.buttonAppearance = plainBarButtonAppearance
navigationBarAppearance.doneButtonAppearance = doneBarButtonAppearance
diff --git a/ios/MullvadVPN/HeaderBarView.swift b/ios/MullvadVPN/HeaderBarView.swift
index d9f23c75a6..da5b1c41b6 100644
--- a/ios/MullvadVPN/HeaderBarView.swift
+++ b/ios/MullvadVPN/HeaderBarView.swift
@@ -10,26 +10,28 @@ import Foundation
import UIKit
class HeaderBarView: UIView {
+ private let brandNameImage = UIImage(named: "LogoText")!
+ .backport_withTintColor(UIColor.HeaderBar.brandNameColor, renderingMode: .alwaysOriginal)
+
let logoImageView: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "LogoIcon"))
imageView.translatesAutoresizingMaskIntoConstraints = false
return imageView
}()
- lazy var titleLabel: UILabel = {
- let titleLabel = UILabel()
- titleLabel.translatesAutoresizingMaskIntoConstraints = false
- titleLabel.text = "MULLVAD VPN"
- titleLabel.font = UIFont.boldSystemFont(ofSize: 24)
- titleLabel.textColor = UIColor.white.withAlphaComponent(0.8)
- titleLabel.accessibilityTraits.insert(.header)
- return titleLabel
+ lazy var brandNameImageView: UIImageView = {
+ let imageView = UIImageView(image: brandNameImage)
+ imageView.translatesAutoresizingMaskIntoConstraints = false
+ imageView.contentMode = .scaleAspectFill
+ return imageView
}()
let settingsButton = makeSettingsButton()
class func makeSettingsButton() -> HeaderBarButton {
- let settingsImage = UIImage(named: "IconSettings")?.withRenderingMode(.alwaysOriginal)
+ let settingsImage = UIImage(named: "IconSettings")?
+ .backport_withTintColor(UIColor.HeaderBar.buttonColor, renderingMode: .alwaysOriginal)
+
let settingsButton = HeaderBarButton(type: .system)
settingsButton.setImage(settingsImage, for: .normal)
settingsButton.translatesAutoresizingMaskIntoConstraints = false
@@ -73,22 +75,27 @@ class HeaderBarView: UIView {
accessibilityContainerType = .semanticGroup
}
+ let imageSize = brandNameImage.size
+ let brandNameAspectRatio = imageSize.width / max(imageSize.height, 1)
+
let constraints = [
logoImageView.leadingAnchor.constraint(equalTo: layoutMarginsGuide.leadingAnchor),
- logoImageView.centerYAnchor.constraint(equalTo: titleLabel.centerYAnchor),
+ logoImageView.centerYAnchor.constraint(equalTo: brandNameImageView.centerYAnchor),
logoImageView.widthAnchor.constraint(equalToConstant: 44),
logoImageView.heightAnchor.constraint(equalTo: logoImageView.widthAnchor, multiplier: 1),
- titleLabel.leadingAnchor.constraint(equalTo: logoImageView.trailingAnchor, constant: 8),
- titleLabel.topAnchor.constraint(equalTo: layoutMarginsGuide.topAnchor, constant: 22),
- layoutMarginsGuide.bottomAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 22),
+ brandNameImageView.leadingAnchor.constraint(equalTo: logoImageView.trailingAnchor, constant: 9),
+ brandNameImageView.topAnchor.constraint(equalTo: layoutMarginsGuide.topAnchor, constant: 22),
+ brandNameImageView.widthAnchor.constraint(equalTo: brandNameImageView.heightAnchor, multiplier: brandNameAspectRatio),
+ brandNameImageView.heightAnchor.constraint(equalToConstant: 18),
+ layoutMarginsGuide.bottomAnchor.constraint(equalTo: brandNameImageView.bottomAnchor, constant: 22),
- settingsButton.leadingAnchor.constraint(greaterThanOrEqualTo: titleLabel.trailingAnchor, constant: 8),
+ settingsButton.leadingAnchor.constraint(greaterThanOrEqualTo: brandNameImageView.trailingAnchor, constant: 8),
settingsButton.trailingAnchor.constraint(equalTo: layoutMarginsGuide.trailingAnchor),
- settingsButton.centerYAnchor.constraint(equalTo: titleLabel.centerYAnchor)
+ settingsButton.centerYAnchor.constraint(equalTo: brandNameImageView.centerYAnchor)
]
- [logoImageView, titleLabel, settingsButton].forEach { addSubview($0) }
+ [logoImageView, brandNameImageView, settingsButton].forEach { addSubview($0) }
NSLayoutConstraint.activate(constraints)
}
diff --git a/ios/MullvadVPN/NotificationBannerView.swift b/ios/MullvadVPN/NotificationBannerView.swift
index 3e857df849..e8b14a2988 100644
--- a/ios/MullvadVPN/NotificationBannerView.swift
+++ b/ios/MullvadVPN/NotificationBannerView.swift
@@ -38,7 +38,7 @@ class NotificationBannerView: UIView {
let textLabel = UILabel()
textLabel.translatesAutoresizingMaskIntoConstraints = false
textLabel.font = UIFont.systemFont(ofSize: 17, weight: .bold)
- textLabel.textColor = .white
+ textLabel.textColor = UIColor.InAppNotificationBanner.titleColor
textLabel.numberOfLines = 0
textLabel.lineBreakMode = .byWordWrapping
return textLabel
@@ -48,7 +48,7 @@ class NotificationBannerView: UIView {
let textLabel = UILabel()
textLabel.translatesAutoresizingMaskIntoConstraints = false
textLabel.font = UIFont.systemFont(ofSize: 17)
- textLabel.textColor = UIColor(white: 1, alpha: 0.6)
+ textLabel.textColor = UIColor.InAppNotificationBanner.bodyColor
textLabel.numberOfLines = 0
textLabel.lineBreakMode = .byWordWrapping
return textLabel
diff --git a/ios/MullvadVPN/PreferencesViewController.swift b/ios/MullvadVPN/PreferencesViewController.swift
index f1ff265002..db26bb6a4b 100644
--- a/ios/MullvadVPN/PreferencesViewController.swift
+++ b/ios/MullvadVPN/PreferencesViewController.swift
@@ -15,6 +15,10 @@ class PreferencesViewController: UITableViewController, PreferencesDataSourceDel
private let dataSource = PreferencesDataSource()
+ override var preferredStatusBarStyle: UIStatusBarStyle {
+ return .lightContent
+ }
+
init() {
super.init(style: .grouped)
}
diff --git a/ios/MullvadVPN/ProblemReportViewController.swift b/ios/MullvadVPN/ProblemReportViewController.swift
index 80870c8ca0..ec9955ea79 100644
--- a/ios/MullvadVPN/ProblemReportViewController.swift
+++ b/ios/MullvadVPN/ProblemReportViewController.swift
@@ -183,6 +183,10 @@ class ProblemReportViewController: UIViewController, UITextFieldDelegate, Condit
// MARK: - View lifecycle
+ override var preferredStatusBarStyle: UIStatusBarStyle {
+ return .lightContent
+ }
+
override var disablesAutomaticKeyboardDismissal: Bool {
// Allow dismissing the keyboard in .formSheet presentation style
return false
diff --git a/ios/MullvadVPN/SettingsAccountCell.swift b/ios/MullvadVPN/SettingsAccountCell.swift
index 11794a6088..30411a1276 100644
--- a/ios/MullvadVPN/SettingsAccountCell.swift
+++ b/ios/MullvadVPN/SettingsAccountCell.swift
@@ -41,11 +41,11 @@ class SettingsAccountCell: SettingsCell {
} else {
detailTitleLabel.text = ""
}
- detailTitleLabel.textColor = .white
+ detailTitleLabel.textColor = UIColor.Cell.detailTextColor
}
} else {
detailTitleLabel.text = ""
- detailTitleLabel.textColor = .white
+ detailTitleLabel.textColor = UIColor.Cell.detailTextColor
}
}
diff --git a/ios/MullvadVPN/SettingsCell.swift b/ios/MullvadVPN/SettingsCell.swift
index e1ee83f99e..02d704f50b 100644
--- a/ios/MullvadVPN/SettingsCell.swift
+++ b/ios/MullvadVPN/SettingsCell.swift
@@ -13,6 +13,14 @@ class SettingsCell: UITableViewCell {
let titleLabel = UILabel()
let detailTitleLabel = UILabel()
+ lazy var customDisclosureIndicator: UIImageView = {
+ let disclosureImage = UIImage(named: "IconChevron")?
+ .backport_withTintColor(UIColor.Cell.disclosureIndicatorColor, renderingMode: .alwaysOriginal)
+
+ return UIImageView(image: disclosureImage)
+ }()
+
+
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
@@ -28,11 +36,11 @@ class SettingsCell: UITableViewCell {
titleLabel.translatesAutoresizingMaskIntoConstraints = false
titleLabel.font = UIFont.systemFont(ofSize: 17)
- titleLabel.textColor = .white
+ titleLabel.textColor = UIColor.Cell.titleTextColor
detailTitleLabel.translatesAutoresizingMaskIntoConstraints = false
detailTitleLabel.font = UIFont.systemFont(ofSize: 13)
- detailTitleLabel.textColor = .white
+ detailTitleLabel.textColor = UIColor.Cell.detailTextColor
titleLabel.setContentHuggingPriority(.defaultHigh, for: .horizontal)
detailTitleLabel.setContentHuggingPriority(.defaultLow, for: .horizontal)
@@ -68,21 +76,13 @@ class SettingsCell: UITableViewCell {
setLayoutMargins()
}
- override func didAddSubview(_ subview: UIView) {
- super.didAddSubview(subview)
-
- if let button = subview as? UIButton {
- updateDisclosureIndicatorTintColor(button)
- }
- }
-
override func layoutSubviews() {
super.layoutSubviews()
if #available(iOS 13, *) {
// no-op
} else {
- layoutSubviewsiOS12()
+ layoutSubviews_iOS12()
}
}
@@ -94,30 +94,19 @@ class SettingsCell: UITableViewCell {
contentView.layoutMargins = UIMetrics.settingsCellLayoutMargins
}
- /// Standard disclosure views do not provide customization of a tint color.
- /// This method adjusts a disclosure tint color by replacing the button image rendering mode on iOS 12 and by
- /// switching graphics on iOS 13 or newer.
- private func updateDisclosureIndicatorTintColor(_ button: UIButton) {
- guard accessoryType == .disclosureIndicator else { return }
-
- if #available(iOS 13, *) {
- let configuration = UIImage.SymbolConfiguration(pointSize: 11, weight: .bold)
- let chevron = UIImage(systemName: "chevron.right", withConfiguration: configuration)?
- .withTintColor(.white, renderingMode: .alwaysOriginal)
- .imageFlippedForRightToLeftLayoutDirection()
+ func setCustomDisclosureIndicator() {
+ accessoryType = .none
+ accessoryView = customDisclosureIndicator
+ }
- button.setImage(chevron, for: .normal)
- } else {
- if let image = button.backgroundImage(for: .normal)?.withRenderingMode(.alwaysTemplate) {
- button.setBackgroundImage(image, for: .normal)
- button.tintColor = .white
- }
- }
+ func unsetCustomDisclosureIndicator() {
+ accessoryView = nil
+ accessoryType = .none
}
/// On iOS 12, standard edit and reorder controls do not respect layout margins.
/// This method does layout adjustments to fix that.
- private func layoutSubviewsiOS12() {
+ private func layoutSubviews_iOS12() {
guard isEditing || showsReorderControl else { return }
var leftOffset: CGFloat = 0
diff --git a/ios/MullvadVPN/SettingsDataSource.swift b/ios/MullvadVPN/SettingsDataSource.swift
index 9d1d48be6b..f4a2267492 100644
--- a/ios/MullvadVPN/SettingsDataSource.swift
+++ b/ios/MullvadVPN/SettingsDataSource.swift
@@ -114,7 +114,7 @@ class SettingsDataSource: NSObject, AccountObserver, UITableViewDataSource, UITa
cell.titleLabel.text = NSLocalizedString("ACCOUNT_CELL_LABEL", tableName: "Settings", value: "Account", comment: "")
cell.accountExpiryDate = Account.shared.expiry
cell.accessibilityIdentifier = "AccountCell"
- cell.accessoryType = .disclosureIndicator
+ cell.setCustomDisclosureIndicator()
return cell
@@ -123,7 +123,7 @@ class SettingsDataSource: NSObject, AccountObserver, UITableViewDataSource, UITa
cell.titleLabel.text = NSLocalizedString("PREFERENCES_CELL_LABEL", tableName: "Settings", value: "Preferences", comment: "")
cell.detailTitleLabel.text = nil
cell.accessibilityIdentifier = nil
- cell.accessoryType = .disclosureIndicator
+ cell.setCustomDisclosureIndicator()
return cell
@@ -132,7 +132,7 @@ class SettingsDataSource: NSObject, AccountObserver, UITableViewDataSource, UITa
cell.titleLabel.text = NSLocalizedString("WIREGUARD_KEY_CELL_LABEL", tableName: "Settings", value: "WireGuard key", comment: "")
cell.detailTitleLabel.text = nil
cell.accessibilityIdentifier = "WireGuardKeyCell"
- cell.accessoryType = .disclosureIndicator
+ cell.setCustomDisclosureIndicator()
return cell
@@ -141,7 +141,7 @@ class SettingsDataSource: NSObject, AccountObserver, UITableViewDataSource, UITa
cell.titleLabel.text = NSLocalizedString("APP_VERSION_CELL_LABEL", tableName: "Settings", value: "App version", comment: "")
cell.detailTitleLabel.text = Bundle.main.productVersion
cell.accessibilityIdentifier = nil
- cell.accessoryType = .none
+ cell.unsetCustomDisclosureIndicator()
return cell
@@ -150,7 +150,7 @@ class SettingsDataSource: NSObject, AccountObserver, UITableViewDataSource, UITa
cell.titleLabel.text = NSLocalizedString("REPORT_PROBLEM_CELL_LABEL", tableName: "Settings", value: "Report a problem", comment: "")
cell.detailTitleLabel.text = nil
cell.accessibilityIdentifier = nil
- cell.accessoryType = .disclosureIndicator
+ cell.setCustomDisclosureIndicator()
return cell
}
diff --git a/ios/MullvadVPN/SettingsViewController.swift b/ios/MullvadVPN/SettingsViewController.swift
index 80bf44338a..16696b977a 100644
--- a/ios/MullvadVPN/SettingsViewController.swift
+++ b/ios/MullvadVPN/SettingsViewController.swift
@@ -17,6 +17,10 @@ class SettingsViewController: UITableViewController, SettingsDataSourceDelegate
weak var delegate: SettingsViewControllerDelegate?
+ override var preferredStatusBarStyle: UIStatusBarStyle {
+ return .lightContent
+ }
+
private let dataSource = SettingsDataSource()
init() {
diff --git a/ios/MullvadVPN/UIColor+Palette.swift b/ios/MullvadVPN/UIColor+Palette.swift
index 3dab013297..755b058cd0 100644
--- a/ios/MullvadVPN/UIColor+Palette.swift
+++ b/ios/MullvadVPN/UIColor+Palette.swift
@@ -60,6 +60,14 @@ extension UIColor {
static let dividerColor = UIColor.black
}
+ // Navigation bars
+ enum NavigationBar {
+ static let backgroundColor = UIColor.secondaryColor
+ static let backButtonIndicatorColor = UIColor(white: 1.0, alpha: 0.4)
+ static let backButtonTitleColor = UIColor(white: 1.0, alpha: 0.6)
+ static let titleColor = UIColor.white
+ }
+
// Cells
enum Cell {
static let backgroundColor = primaryColor
@@ -69,14 +77,19 @@ extension UIColor {
static let disabledSelectedBackgroundColor = selectedBackgroundColor.darkened(by: 0.3)!
static let selectedAltBackgroundColor = backgroundColor.darkened(by: 0.2)!
+
+ static let titleTextColor = UIColor.white
+ static let detailTextColor = UIColor(white: 1.0, alpha: 0.8)
+
+ static let disclosureIndicatorColor = UIColor(white: 1.0, alpha: 0.8)
}
enum SubCell {
- static let backgroundColor = namedColor("SubCell")
+ static let backgroundColor = UIColor(red: 0.15, green: 0.23, blue: 0.33, alpha: 1.0)
}
enum SubSubCell {
- static let backgroundColor = namedColor("SubSubCell")
+ static let backgroundColor = UIColor(red: 0.13, green: 0.20, blue: 0.30, alpha: 1.0)
}
enum HeaderBar {
@@ -84,25 +97,23 @@ extension UIColor {
static let unsecuredBackgroundColor = dangerColor
static let securedBackgroundColor = successColor
static let dividerColor = secondaryColor
+ static let brandNameColor = UIColor(white: 1.0, alpha: 0.8)
+ static let buttonColor = UIColor(white: 1.0, alpha: 0.8)
}
enum InAppNotificationBanner {
static let errorIndicatorColor = dangerColor
static let successIndicatorColor = successColor
static let warningIndicatorColor = warningColor
+
+ static let titleColor = UIColor.white
+ static let bodyColor = UIColor(white: 1.0, alpha: 0.6)
}
// Common colors
- static let primaryColor = namedColor("Primary")
- static let secondaryColor = namedColor("Secondary")
- static let dangerColor = namedColor("Danger")
- static let warningColor = namedColor("Warning")
- static let successColor = namedColor("Success")
-}
-
-/// This is a helper function to access named colors from the main bundle and circumvent storyboard
-/// crash.
-/// See: https://openradar.appspot.com/47113341
-private func namedColor(_ name: StringLiteralType) -> UIColor {
- UIColor(named: name, in: Bundle(for: AppDelegate.self), compatibleWith: nil)!
+ static let primaryColor = UIColor(red: 0.16, green: 0.30, blue: 0.45, alpha: 1.0)
+ static let secondaryColor = UIColor(red: 0.10, green: 0.18, blue: 0.27, alpha: 1.0)
+ static let dangerColor = UIColor(red: 0.89, green: 0.25, blue: 0.22, alpha: 1.0)
+ static let warningColor = UIColor(red: 1.0, green: 0.84, blue: 0.14, alpha: 1.0)
+ static let successColor = UIColor(red: 0.27, green: 0.68, blue: 0.30, alpha: 1.0)
}
diff --git a/ios/MullvadVPN/UIImage+TintColor.swift b/ios/MullvadVPN/UIImage+TintColor.swift
new file mode 100644
index 0000000000..b8b7dd1731
--- /dev/null
+++ b/ios/MullvadVPN/UIImage+TintColor.swift
@@ -0,0 +1,34 @@
+//
+// UIImage+TintColor.swift
+// MullvadVPN
+//
+// Created by pronebird on 17/11/2021.
+// Copyright © 2021 Mullvad VPN AB. All rights reserved.
+//
+
+import UIKit
+
+extension UIImage {
+
+ func backport_withTintColor(_ tintColor: UIColor) -> UIImage {
+ return backport_withTintColor(tintColor, renderingMode: renderingMode)
+ }
+
+ func backport_withTintColor(_ tintColor: UIColor, renderingMode: RenderingMode) -> UIImage {
+ if #available(iOS 13, *) {
+ return withTintColor(tintColor, renderingMode: renderingMode)
+ }
+
+ let rect = CGRect(origin: .zero, size: size)
+ let renderer = UIGraphicsImageRenderer(size: size)
+
+ let renderedImage = renderer.image { context in
+ tintColor.setFill()
+ context.fill(rect)
+ draw(in: rect, blendMode: .destinationIn, alpha: 1)
+ }
+
+ return renderedImage.withRenderingMode(renderingMode)
+ }
+
+}
diff --git a/ios/MullvadVPN/WireguardKeysViewController.swift b/ios/MullvadVPN/WireguardKeysViewController.swift
index ee490a3a6d..b54e0da2ad 100644
--- a/ios/MullvadVPN/WireguardKeysViewController.swift
+++ b/ios/MullvadVPN/WireguardKeysViewController.swift
@@ -45,6 +45,10 @@ class WireguardKeysViewController: UIViewController, TunnelObserver {
}
}
+ override var preferredStatusBarStyle: UIStatusBarStyle {
+ return .lightContent
+ }
+
override func viewDidLoad() {
super.viewDidLoad()
diff --git a/ios/convert-assets.rb b/ios/convert-assets.rb
index 7352d87bea..ac9584c1b2 100755
--- a/ios/convert-assets.rb
+++ b/ios/convert-assets.rb
@@ -15,19 +15,14 @@ GRAPHICAL_ASSETS_DIR = File.join(ROOT_DIR, "gui/assets/images")
ADDITIONAL_ASSETS_DIR = File.join(SCRIPT_DIR, "AdditionalAssets")
# graphical assets to import
-GRAPHICAL_ASSETS=[
- "icon-alert.svg",
+GRAPHICAL_ASSETS = [
"icon-arrow.svg",
"icon-back.svg",
"icon-chevron-down.svg",
"icon-chevron-up.svg",
"icon-chevron.svg",
- "icon-close-sml.svg",
- "icon-close.svg",
"icon-extLink.svg",
"icon-fail.svg",
- "icon-fastest.svg",
- "icon-nearest.svg",
"icon-reload.svg",
"icon-settings.svg",
"icon-spinner.svg",
@@ -35,11 +30,12 @@ GRAPHICAL_ASSETS=[
"icon-tick.svg",
"location-marker-secure.svg",
"location-marker-unsecure.svg",
- "logo-icon.svg"
+ "logo-icon.svg",
+ "logo-text.svg"
]
# App icon sizes
-APP_ICON_SIZES=[
+APP_ICON_SIZES = [
# iphone-notification 20pt at 2x, 3x
["AppIconPhoneNotification", 20, 2, 3],
@@ -83,6 +79,12 @@ ADDITIONAL_ASSETS = [
"IconBackTransitionMask.svg"
]
+# SVG convertion tool environment variables.
+SVG_CONVERT_ENVIRONMENT_VARIABLES = {
+ # Fix PDF "CreationDate" for reproducible output
+ "SOURCE_DATE_EPOCH" => "1596022781"
+}
+
# Functions
def generate_graphical_assets()
@@ -99,7 +101,7 @@ def generate_graphical_assets()
output_file = File.join(output_dir, "#{image_name}.pdf")
puts "Convert #{svg_file} -> #{output_file}"
- system("rsvg-convert", "--format=pdf", svg_file, "--output", output_file)
+ system(SVG_CONVERT_ENVIRONMENT_VARIABLES, "rsvg-convert", "--format=pdf", svg_file, "--output", output_file)
end
end
@@ -117,9 +119,6 @@ def genereate_app_icon()
end
def generate_additional_assets()
- # Fix PDF "CreationDate" for reproducible output
- environment_variables = { "SOURCE_DATE_EPOCH" => "1596022781" }
-
for asset_name in ADDITIONAL_ASSETS do
svg_file = File.join(ADDITIONAL_ASSETS_DIR, asset_name)
image_name = File.basename(svg_file, ".svg")
@@ -132,7 +131,7 @@ def generate_additional_assets()
end
puts "Generate #{image_name} -> #{output_file}"
- system(environment_variables, "rsvg-convert", "-f", "pdf", "-o", output_file, svg_file)
+ system(SVG_CONVERT_ENVIRONMENT_VARIABLES, "rsvg-convert", "--format=pdf", svg_file, "--output", output_file)
end
end