Switch to libCSColorPicker

This commit is contained in:
2020-02-06 17:53:33 -05:00
parent 91f37f3213
commit c59707850a
8 changed files with 112 additions and 95 deletions

View File

@ -12,7 +12,7 @@ ZenithDarkPrefs_INSTALL_PATH = /Library/PreferenceBundles
ZenithDarkPrefs_FRAMEWORKS = UIKit
ZenithDarkPrefs_PRIVATE_FRAMEWORKS = Preferences
ZenithDarkPrefs_EXTRA_FRAMEWORKS = Cephei CepheiPrefs
ZenithDarkPrefs_LIBRARIES = sparkcolourpicker
$(BUNDLE_NAME)_LDFLAGS += -lCSColorPicker
include $(THEOS_MAKE_PATH)/bundle.mk

View File

@ -45,67 +45,92 @@
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Color Options</string>
<string></string>
<key>footerText</key>
<string>Default: #000000:0.44</string>
<string></string>
</dict>
<dict>
<key>cell</key>
<string>PSLinkCell</string>
<key>cellClass</key>
<string>SparkColourPickerCell</string>
<key>libsparkcolourpicker</key>
<dict>
<key>defaults</key>
<string>com.mac-user669.zenithdark</string>
<key>key</key>
<string>kCustomDarkColor</string>
<key>fallback</key>
<string>#000000:0.44</string>
<key>alpha</key>
<true/>
</dict>
<key>label</key>
<string>Dark Color</string>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.mac-user669.zenithdark</string>
<key>key</key>
<string>kCustomDarkColor</string>
<string>kCustomDarkColorEnabled</string>
<key>label</key>
<string>Custom Dark Color</string>
<key>PostNotification</key>
<string>com.mac-user669.zenithdark.prefschanged</string>
</dict>
<dict>
<key>PostNotification</key>
<string>com.mac-user669.zenithdark.prefschanged</string>
<key>cell</key>
<string>PSLinkCell</string>
<key>cellClass</key>
<string>CSColorDisplayCell</string>
<key>defaults</key>
<string>com.mac-user669.zenithdark</string>
<key>defaultsPath</key>
<string>/Library/PreferenceBundles/ZenithDark.bundle</string>
<key>key</key>
<string>kDarkCustomColor</string>
<key>label</key>
<string>Dark Color</string>
<key>fallback</key>
<string>70000000</string>
<key>alpha</key>
<true/>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string></string>
<key>footerText</key>
<string>Default: #FFFFFF:0.7</string>
<string></string>
</dict>
<dict>
<key>cell</key>
<string>PSLinkCell</string>
<key>cellClass</key>
<string>SparkColourPickerCell</string>
<key>libsparkcolourpicker</key>
<dict>
<key>defaults</key>
<string>com.mac-user669.zenithdark</string>
<key>key</key>
<string>kCustomLightColor</string>
<key>fallback</key>
<string>#FFFFFF:0.7</string>
<key>alpha</key>
<true/>
</dict>
<key>label</key>
<string>Light Color</string>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.mac-user669.zenithdark</string>
<key>key</key>
<string>kCustomLightColor</string>
<string>kCustomLightColorEnabled</string>
<key>label</key>
<string>Custom Light Color</string>
<key>PostNotification</key>
<string>com.mac-user669.zenithdark.prefschanged</string>
</dict>
<dict>
<key>PostNotification</key>
<string>com.mac-user669.zenithdark.prefschanged</string>
<key>cell</key>
<string>PSLinkCell</string>
<key>cellClass</key>
<string>CSColorDisplayCell</string>
<key>defaults</key>
<string>com.mac-user669.zenithdark</string>
<key>defaultsPath</key>
<string>/Library/PreferenceBundles/ZenithDark.bundle</string>
<key>key</key>
<string>kLightCustomColor</string>
<key>label</key>
<string>Light Color</string>
<key>fallback</key>
<string>B3FFFFFF</string>
<key>alpha</key>
<true/>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
@ -157,6 +182,8 @@
<dict>
<key>cell</key>
<string>PSButtonCell</string>
<key>cellClass</key>
<string>HBTintedTableCell</string>
<key>label</key>
<string>Reset Settings</string>
<key>action</key>

View File

@ -1,6 +1,7 @@
#import <Preferences/PSListController.h>
#import <CepheiPrefs/HBRootListController.h>
#import <CepheiPrefs/HBAppearanceSettings.h>
#import <Cephei/HBRespringController.h>
#import <Cephei/HBPreferences.h>
@import UIKit;

View File

@ -1,8 +1,5 @@
#import "ZNDarkPrefsRootListController.h"
#import <CepheiPrefs/HBAppearanceSettings.h>
#import <Cephei/HBRespringController.h>
#import <Cephei/HBPreferences.h>
#import "SparkColourPickerUtils.h"
#include <CSColorPicker/CSColorPicker.h>
#define THEME_COLOR \
[UIColor colorWithRed:0.82 \
@ -91,6 +88,7 @@
return _specifiers;
}
- (void)respring {
[[UIApplication sharedApplication] sendAction:@selector(resignFirstResponder) to:nil from:nil forEvent:nil]; // Dismisses keyboard
[HBRespringController respringAndReturnTo:[NSURL URLWithString:@"prefs:root=ZenithDark"]];