Skip to content

Commit 0a50afc

Browse files
committed
dark theme with options
1 parent c3759b3 commit 0a50afc

File tree

7 files changed

+27
-2
lines changed

7 files changed

+27
-2
lines changed

iOS-Email-Client/Controllers/ComposeViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ class ComposeViewController: UIViewController {
327327
}
328328

329329
override func viewDidAppear(_ animated: Bool) {
330+
accountOptionsView.refreshView()
330331
IQKeyboardManager.shared.enable = false
331332
if let popover = popoverToPresent {
332333
self.presentPopover(popover: popover, height: 205)

iOS-Email-Client/Controllers/InboxViewController.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,6 +1973,10 @@ extension InboxViewController: ThemeDelegate {
19731973
func swapTheme(_ theme: Theme) {
19741974
applyTheme()
19751975
tableView.reloadData()
1976+
generalOptionsContainerView.refreshView()
1977+
if let menuViewController = navigationDrawerController?.leftViewController as? MenuViewController {
1978+
menuViewController.reloadView()
1979+
}
19761980
}
19771981
}
19781982

iOS-Email-Client/Views/AccountFromCell.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ class AccountFromCell: UITableViewCell{
1313

1414
override func awakeFromNib() {
1515
super.awakeFromNib()
16+
applyTheme()
17+
}
18+
19+
override func prepareForReuse() {
20+
super.prepareForReuse()
21+
applyTheme()
22+
}
23+
24+
func applyTheme() {
1625
let theme = ThemeManager.shared.theme
1726
emailLabel.textColor = theme.mainText
1827
backgroundColor = .clear

iOS-Email-Client/Views/AccountTableCell.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ class AccountTableCell: UITableViewCell {
1919
applyTheme()
2020
}
2121

22+
override func prepareForReuse() {
23+
super.prepareForReuse()
24+
applyTheme()
25+
}
26+
2227
func applyTheme() {
2328
let theme = ThemeManager.shared.theme
2429
nameLabel.textColor = theme.markedText

iOS-Email-Client/Views/AccountsFooterCell.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ class AccountsFooterCell: UITableViewHeaderFooterView {
2424
self.applyLocalization()
2525
}
2626

27+
override func prepareForReuse() {
28+
super.prepareForReuse()
29+
self.applyTheme()
30+
}
31+
2732
func applyLocalization() {
2833
existingLabel.text = String.localize("ADD_ACCOUNT")
2934
}

iOS-Email-Client/Views/Base.lproj/MoreOptionsUIView.xib

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
1111
</dependencies>
1212
<objects>
13-
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MoreOptionsUIView" customModule="iOS_Email_Client" customModuleProvider="target">
13+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MoreOptionsUIView" customModule="ShareExtension" customModuleProvider="target">
1414
<connections>
1515
<outlet property="backgroundOverlayView" destination="RKg-ih-58I" id="gNY-9F-Nsn"/>
1616
<outlet property="optionsContainerOffsetConstraint" destination="Nia-Ea-Iem" id="qz0-Lk-2Li"/>
@@ -34,7 +34,7 @@
3434
<subviews>
3535
<tableView clipsSubviews="YES" contentMode="scaleToFill" bounces="NO" scrollEnabled="NO" bouncesZoom="NO" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="Cvd-Do-TlH">
3636
<rect key="frame" x="0.0" y="0.0" width="375" height="247"/>
37-
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
37+
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
3838
</tableView>
3939
</subviews>
4040
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

iOS-Email-Client/Views/MoreOptionsUIView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class MoreOptionsUIView : UIView {
5353

5454
func applyTheme() {
5555
let theme = ThemeManager.shared.theme
56+
tableView.backgroundColor = .clear
5657
optionsContainerView.backgroundColor = theme.background
5758
}
5859

0 commit comments

Comments
 (0)