Fixed Color Picker and added Reset button

This commit is contained in:
2020-02-04 22:21:42 -05:00
parent e1a9c4f9cb
commit 5b26ad7238
3 changed files with 43 additions and 1 deletions

View File

@ -46,7 +46,7 @@ else {
colourString = [preferencesDictionary objectForKey: @"kCustomDarkColor"]; colourString = [preferencesDictionary objectForKey: @"kCustomDarkColor"];
} }
UIColor* darkColor = [SparkColourPickerUtils colourWithString: colourString withFallback: @"#FF00FF"]; UIColor* darkColor = [SparkColourPickerUtils colourWithString: colourString withFallback: @"#000000:0.44"];
// by default have our tweak overide this. // by default have our tweak overide this.
if (@available(iOS 13, *)) { if (@available(iOS 13, *)) {

View File

@ -46,6 +46,8 @@
<string>PSGroupCell</string> <string>PSGroupCell</string>
<key>label</key> <key>label</key>
<string>Color Options</string> <string>Color Options</string>
<key>footerText</key>
<string>Default: #000000:0.44</string>
</dict> </dict>
<dict> <dict>
<key>cell</key> <key>cell</key>
@ -109,6 +111,35 @@
<key>label</key> <key>label</key>
<string>About</string> <string>About</string>
</dict> </dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string></string>
<key>footerText</key>
<string></string>
</dict>
<dict>
<key>cell</key>
<string>PSButtonCell</string>
<key>label</key>
<string>Reset Settings</string>
<key>action</key>
<string>resetSettings</string>
<key>confirmation</key>
<dict>
<key>title</key>
<string>Reset</string>
<key>prompt</key>
<string>Reset all settings?</string>
<key>okTitle</key>
<string>Reset</string>
<key>cancelTitle</key>
<string>Cancel</string>
</dict>
</dict>
</array> </array>
<key>title</key> <key>title</key>
<string></string> <string></string>

View File

@ -2,6 +2,7 @@
#import <CepheiPrefs/HBAppearanceSettings.h> #import <CepheiPrefs/HBAppearanceSettings.h>
#import <Cephei/HBRespringController.h> #import <Cephei/HBRespringController.h>
#import <Cephei/HBPreferences.h> #import <Cephei/HBPreferences.h>
#import "SparkColourPickerUtils.h"
#define THEME_COLOR \ #define THEME_COLOR \
[UIColor colorWithRed:0.82 \ [UIColor colorWithRed:0.82 \
@ -23,6 +24,16 @@
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose target:self action:@selector(shareTapped)]; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose target:self action:@selector(shareTapped)];
} }
- (void)resetSettings {
CFArrayRef keyList = CFPreferencesCopyKeyList(CFSTR("com.mac-user669.zenithdark"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
if (keyList) {
CFPreferencesSetMultiple(nil, keyList, CFSTR("com.mac-user669.zenithdark"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
CFRelease(keyList);
}
[[NSFileManager defaultManager] removeItemAtPath:@"/var/mobile/Library/Preferences/com.mac-user669.zenithdark.plist" error:nil];
[self respring];
}
// Hide Large Title // Hide Large Title
- (void)viewDidLoad { - (void)viewDidLoad {