Fixed Color Picker and added Reset button
This commit is contained in:
2
Tweak.xm
2
Tweak.xm
@ -46,7 +46,7 @@ else {
|
||||
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.
|
||||
if (@available(iOS 13, *)) {
|
||||
|
@ -46,6 +46,8 @@
|
||||
<string>PSGroupCell</string>
|
||||
<key>label</key>
|
||||
<string>Color Options</string>
|
||||
<key>footerText</key>
|
||||
<string>Default: #000000:0.44</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>cell</key>
|
||||
@ -109,6 +111,35 @@
|
||||
<key>label</key>
|
||||
<string>About</string>
|
||||
</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>
|
||||
<key>title</key>
|
||||
<string></string>
|
||||
|
@ -2,6 +2,7 @@
|
||||
#import <CepheiPrefs/HBAppearanceSettings.h>
|
||||
#import <Cephei/HBRespringController.h>
|
||||
#import <Cephei/HBPreferences.h>
|
||||
#import "SparkColourPickerUtils.h"
|
||||
|
||||
#define THEME_COLOR \
|
||||
[UIColor colorWithRed:0.82 \
|
||||
@ -23,6 +24,16 @@
|
||||
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
|
||||
- (void)viewDidLoad {
|
||||
|
Reference in New Issue
Block a user