Add basic OLED black theme

This commit is contained in:
Aaron Raimist
2017-11-21 20:55:11 -06:00
parent 22c97b5e64
commit 8abe65b289
6 changed files with 51 additions and 2 deletions
+10 -1
View File
@@ -3542,7 +3542,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
{
__weak typeof(self) weakSelf = self;
__block UIAlertAction *autoAction, *lightAction, *darkAction;
__block UIAlertAction *autoAction, *lightAction, *darkAction, *blackAction;
NSString *themePickerMessage;
void (^actionBlock)(UIAlertAction *action) = ^(UIAlertAction * action) {
@@ -3564,6 +3564,10 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
{
newTheme = @"dark";
}
else if (action == blackAction)
{
newTheme = @"black";
}
NSString *theme = [[NSUserDefaults standardUserDefaults] stringForKey:@"userInterfaceTheme"];
if (newTheme && ![newTheme isEqualToString:theme])
@@ -3598,6 +3602,10 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
darkAction = [UIAlertAction actionWithTitle:NSLocalizedStringFromTable(@"settings_ui_theme_dark", @"Vector", nil)
style:UIAlertActionStyleDefault
handler:actionBlock];
blackAction = [UIAlertAction actionWithTitle:NSLocalizedStringFromTable(@"settings_ui_theme_black", @"Vector", nil)
style:UIAlertActionStyleDefault
handler:actionBlock];
UIAlertController *themePicker = [UIAlertController alertControllerWithTitle:NSLocalizedStringFromTable(@"settings_ui_theme_picker_title", @"Vector", nil)
message:themePickerMessage
@@ -3609,6 +3617,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
}
[themePicker addAction:lightAction];
[themePicker addAction:darkAction];
[themePicker addAction:blackAction];
// Cancel button
[themePicker addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]