return prefs[key]; | return prefs[key]; | ||||
} | } | ||||
%group TweakGroup | |||||
%group Tweak13 | |||||
%hook ZNGrabberAccessoryView | %hook ZNGrabberAccessoryView | ||||
// this is called when iOS 13's dark mode is enabled! | // this is called when iOS 13's dark mode is enabled! | ||||
%end | %end | ||||
%end | %end | ||||
static BOOL ios13; | |||||
%group Tweak12 | |||||
//We then hook the class in this case Zenith's grabber view is called “ZNGrabberAccessoryView” | |||||
%hook ZNGrabberAccessoryView | |||||
// The method we then modify is this method that is called from UIImageView to set the backgroundColor of the image view. | |||||
// Since the grabber view is of type UIImageView we can modify this method :) | |||||
-(void)setBackgroundColor:(UIColor *)backgroundColor { | |||||
if (kCustomDarkColorEnabled) { | |||||
%orig([UIColor cscp_colorFromHexString:StringForPreferenceKey(@"kDarkCustomColor")]); | |||||
} | |||||
else { | |||||
%orig(kDarkModeColor); | |||||
} | |||||
} | |||||
// We need to make sure we tell theos that we are finished hooking this class not doing so with cause the end of the world :P | |||||
%end | |||||
%end | |||||
static void loadPrefs() { // Load preferences to make sure changes are written to the plist | static void loadPrefs() { // Load preferences to make sure changes are written to the plist | ||||
// Thanks to skittyblock! | // Thanks to skittyblock! | ||||
loadPrefs(); // Load our prefs | loadPrefs(); // Load our prefs | ||||
if (kEnabled) { // If enabled | if (kEnabled) { // If enabled | ||||
%init(TweakGroup); // Enable the group "TweakGroup" | |||||
if (@available(iOS 13, *)) { // If the device is running iOS 13 | |||||
ios13 = YES; // Set "iOS13" to "YES" | |||||
%init(Tweak13); // Enable the group "Tweak13" | |||||
} else { | |||||
ios13 = NO; // Set "iOS13" to "NO" | |||||
%init(Tweak12); // Enable the group "Tweak12" | |||||
} | |||||
} | } | ||||
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback) PreferencesChangedCallback, CFSTR("com.mac-user669.zenithdark.prefschanged"), NULL, CFNotificationSuspensionBehaviorDeliverImmediately); | CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback) PreferencesChangedCallback, CFSTR("com.mac-user669.zenithdark.prefschanged"), NULL, CFNotificationSuspensionBehaviorDeliverImmediately); |
Package: com.mac-user669.zenithdark | Package: com.mac-user669.zenithdark | ||||
Version: 1.6 | |||||
Version: 1.7 | |||||
Architecture: iphoneos-arm | Architecture: iphoneos-arm | ||||
Maintainer: mac-user669 <cooper@cooperhull.com> | Maintainer: mac-user669 <cooper@cooperhull.com> | ||||
Depends: mobilesubstrate, preferenceloader, com.muirey03.zenith, ws.hbang.common (>= 1.11), firmware (>=13.0), org.thebigboss.libcolorpicker | |||||
Depends: mobilesubstrate, preferenceloader, com.muirey03.zenith, ws.hbang.common (>= 1.14), com.creaturesurvive.libcscolorpicker | |||||
Section: Tweaks | Section: Tweaks | ||||
Description: Changes Zeniths tabs to a dark blur | |||||
Description: Changes Zenith's tab color! | |||||
Author: mac-user669 <cooper@cooperhull.com> | Author: mac-user669 <cooper@cooperhull.com> | ||||
Name: ZenithDark | Name: ZenithDark | ||||
Sileodepiction: https://mac-user669.github.io/repo/sileodepictions/ZenithDark.json | Sileodepiction: https://mac-user669.github.io/repo/sileodepictions/ZenithDark.json |
ARCHS = arm64 arm64e | ARCHS = arm64 arm64e | ||||
SDK = iPhoneOS12.2 | SDK = iPhoneOS12.2 | ||||
FINALPACKAGE = 1 | FINALPACKAGE = 1 | ||||
TARGET = iphone:12.2:13.0 | |||||
TARGET = iphone:12.2:12.0 | |||||
include $(THEOS)/makefiles/common.mk | include $(THEOS)/makefiles/common.mk |
<key>packageIdentifier</key> | <key>packageIdentifier</key> | ||||
<string>com.mac-user669.zenithdark</string> | <string>com.mac-user669.zenithdark</string> | ||||
<key>titleColor</key> | <key>titleColor</key> | ||||
<string>#D0A400</string> | |||||
<string>#f5bc00</string> | |||||
<key>subtitleColor</key> | <key>subtitleColor</key> | ||||
<string>#D0A400</string> | |||||
<string>#f5bc00</string> | |||||
</dict> | </dict> | ||||
<dict> | <dict> | ||||
<key>label</key> | <key>label</key> | ||||
<string></string> | <string></string> | ||||
<key>footerText</key> | <key>footerText</key> | ||||
<string></string> | |||||
<string>Note: This won't affect anything on iOS 12</string> | |||||
</dict> | </dict> | ||||
<dict> | <dict> | ||||
<key>cell</key> | <key>cell</key> | ||||
<string>PSSwitchCell</string> | <string>PSSwitchCell</string> | ||||
<key>PostNotification</key> | <key>PostNotification</key> | ||||
<string>com.mac-user669.zenithdark.prefschanged</string> | <string>com.mac-user669.zenithdark.prefschanged</string> | ||||
</dict> | </dict> | ||||
<dict> | <dict> | ||||
<key>PostNotification</key> | <key>PostNotification</key> | ||||
<string>com.mac-user669.zenithdark.prefschanged</string> | |||||
<string>com.mac-user669.zenithdark.prefschanged</string> | |||||
<key>cell</key> | <key>cell</key> | ||||
<string>PSLinkCell</string> | <string>PSLinkCell</string> | ||||
<key>cellClass</key> | <key>cellClass</key> | ||||
<string>CSColorDisplayCell</string> | <string>CSColorDisplayCell</string> | ||||
<key>defaults</key> | <key>defaults</key> | ||||
<string>com.mac-user669.zenithdark</string> | |||||
<string>com.mac-user669.zenithdark</string> | |||||
<key>defaultsPath</key> | <key>defaultsPath</key> | ||||
<string>/Library/PreferenceBundles/ZenithDark.bundle</string> | <string>/Library/PreferenceBundles/ZenithDark.bundle</string> | ||||
<key>key</key> | <key>key</key> |
#include <CSColorPicker/CSColorPicker.h> | #include <CSColorPicker/CSColorPicker.h> | ||||
#define THEME_COLOR \ | #define THEME_COLOR \ | ||||
[UIColor colorWithRed:0.82 \ | |||||
green:0.64 \ | |||||
[UIColor colorWithRed:0.96 \ | |||||
green:0.74 \ | |||||
blue:0.00 \ | blue:0.00 \ | ||||
alpha:1.0]; | |||||
alpha:1.00]; | |||||
@implementation ZNDarkPrefsRootListController | @implementation ZNDarkPrefsRootListController |