소스 검색

Fixed Color Picker and added Reset button

master
mac-user669 4 년 전
부모
커밋
5b26ad7238
3개의 변경된 파일43개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      Tweak.xm
  2. +31
    -0
      zenithdarkprefs/Resources/Root.plist
  3. +11
    -0
      zenithdarkprefs/ZNDarkPrefsRootListController.m

+ 1
- 1
Tweak.xm 파일 보기

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, *)) {

+ 31
- 0
zenithdarkprefs/Resources/Root.plist 파일 보기

<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>
<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>

+ 11
- 0
zenithdarkprefs/ZNDarkPrefsRootListController.m 파일 보기

#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 \
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 {

Loading…
취소
저장