Skip to content

Commit

Permalink
Fix dark mode when large titles are disabled with a tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
pwn20wndstuff committed Jun 1, 2019
1 parent f02c526 commit ca70862
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Undecimus/source/JailbreakViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ - (void)darkMode {
[self.backgroundView setBackgroundColor:[UIColor colorWithRed:10.0f/255.0f green:13.0f/255.0f blue:17.0f/255.0f alpha:0.97f]];
[self.mainDevsButton setTitleColor:[UIColor whiteColor] forState:normal];
[self.settingsNavBar setTintColor:[UIColor whiteColor]];
[self.settingsNavBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
[self.settingsNavBar setLargeTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
[self.creditsNavBar setTintColor:[UIColor whiteColor]];
[self.creditsNavBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
[self.creditsNavBar setLargeTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
self.jailbreakProgressBar.trackTintColor = [UIColor blackColor];
[self setNeedsStatusBarAppearanceUpdate];
Expand All @@ -163,8 +165,10 @@ - (void)lightMode {
[self.outputView setTextColor:[UIColor blackColor]];
[self.backgroundView setBackgroundColor:[UIColor.whiteColor colorWithAlphaComponent:0.84]];
[self.settingsNavBar setTintColor:[UIColor blackColor]];
[self.settingsNavBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor]}];
[self.settingsNavBar setLargeTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor]}];
[self.creditsNavBar setTintColor:[UIColor blackColor]];
[self.creditsNavBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor]}];
[self.creditsNavBar setLargeTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor]}];
self.jailbreakProgressBar.trackTintColor = [UIColor lightGrayColor];
[self setNeedsStatusBarAppearanceUpdate];
Expand Down
4 changes: 4 additions & 0 deletions Undecimus/source/SettingsTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ -(void)darkModeSettings:(NSNotification *) notification {
[self.expiryLabel setValue:[UIColor darkGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
[self.uptimeLabel setValue:[UIColor darkGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
[self.upTimeLabel setTextColor:[UIColor whiteColor]];

[JailbreakViewController.sharedController.navigationController.navigationBar setLargeTitleTextAttributes:@{ NSForegroundColorAttributeName : [UIColor whiteColor] }];
}

-(void)lightModeSettings:(NSNotification *) notification {
Expand Down Expand Up @@ -129,6 +131,8 @@ -(void)lightModeSettings:(NSNotification *) notification {
[self.expiryLabel setValue:[UIColor lightGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
[self.uptimeLabel setValue:[UIColor lightGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
[self.upTimeLabel setTextColor:[UIColor blackColor]];

[JailbreakViewController.sharedController.navigationController.navigationBar setLargeTitleTextAttributes:@{ NSForegroundColorAttributeName : [UIColor blackColor] }];
}

- (void)userTappedAnyware:(UITapGestureRecognizer *) sender
Expand Down

0 comments on commit ca70862

Please sign in to comment.