diff --git a/Makefile b/Makefile index e388476..5b25f1e 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,8 @@ include $(THEOS)/makefiles/common.mk TWEAK_NAME = ZenithDark -$(TWEAK_NAME)_FILES = Tweak.xm -$(TWEAK_NAME)_FRAMEWORKS = UIKit CoreGraphics -$(TWEAK_NAME)_EXTRA_FRAMEWORKS += Cephei CepheiPrefs +ZenithDark_FILES = Tweak.xm +ZenithDark_FRAMEWORKS = UIKit CoreGraphics include $(THEOS_MAKE_PATH)/tweak.mk @@ -16,4 +15,4 @@ SUBPROJECTS += zenithdarkprefs include $(THEOS_MAKE_PATH)/aggregate.mk after-install:: - install.exec "sbreload" + install.exec "sbreload" \ No newline at end of file diff --git a/Tweak.xm b/Tweak.xm index 9436200..7302a66 100644 --- a/Tweak.xm +++ b/Tweak.xm @@ -1,5 +1,4 @@ #import "ZenithDark.h" -#import /* diff --git a/control b/control index a0af5a5..53b2813 100644 --- a/control +++ b/control @@ -2,7 +2,7 @@ Package: com.mac-user669.zenithdark Version: 1.2 Architecture: iphoneos-arm Maintainer: mac-user669 -Depends: mobilesubstrate, preferenceloader, com.muirey03.zenith, ws.hbang.common (>= 1.14) +Depends: mobilesubstrate, preferenceloader, com.muirey03.zenith Section: Tweaks Description: Changes Zeniths tabs to a dark blur Author: mac-user669 diff --git a/zenithdarkprefs/Makefile b/zenithdarkprefs/Makefile index b2ae57c..1c399e6 100644 --- a/zenithdarkprefs/Makefile +++ b/zenithdarkprefs/Makefile @@ -11,7 +11,6 @@ ZenithDarkPrefs_FILES = ZNDarkPrefsRootListController.m ZenithDarkPrefs_INSTALL_PATH = /Library/PreferenceBundles ZenithDarkPrefs_FRAMEWORKS = UIKit ZenithDarkPrefs_PRIVATE_FRAMEWORKS = Preferences -ZenithDarkPrefs_EXTRA_FRAMEWORKS += Cephei CepheiPrefs include $(THEOS_MAKE_PATH)/bundle.mk diff --git a/zenithdarkprefs/Resources/Root.plist b/zenithdarkprefs/Resources/Root.plist index 6e21174..e32dd84 100644 --- a/zenithdarkprefs/Resources/Root.plist +++ b/zenithdarkprefs/Resources/Root.plist @@ -4,25 +4,6 @@ items - - - cell - PSGroupCell - headerCellClass - HBPackageNameHeaderCell - packageIdentifier - com.mac-user669.zenithdark - backgroundGradientColors - - #D0A400 - #D0A400 - - titleColor - #111111 - subtitleColor - #444444 - - cell PSGroupCell @@ -58,8 +39,6 @@ PSButtonCell label Respring - cellClass - HBTintedTableCell action doAFancyRespring @@ -72,21 +51,15 @@ Conceptualized by yours truly. - cellClass - HBTwitterCell - label - mac-user669 - user - mac_user669 - - - cellClass - HBLinkTableCell - label - Donate - url - https://paypal.me/macuser669 - + icon + mac-user669.png + cell + PSButtonCell + label + @mac_user669 + action + followMe + cell PSGroupCell @@ -94,21 +67,15 @@ Coded most of the tweak. - cellClass - HBTwitterCell - label - iKilledAppl3 - user - iKilledAppl3 - - - cellClass - HBLinkTableCell - label - Donate - url - https://paypal.me/iKilledAppl3 - + icon + iKA.png + cell + PSButtonCell + label + @iKilledAppl3 + action + followiKA + cell PSGroupCell @@ -116,13 +83,15 @@ Helped with some of our preferences code and amongst other things. - cellClass - HBTwitterCell - label - Skittyblock - user - Skittyblock - + icon + skitty.png + cell + PSButtonCell + label + @Skittyblock + action + followSkitty + title ZenithDark diff --git a/zenithdarkprefs/Resources/iKA@2x.png b/zenithdarkprefs/Resources/iKA@2x.png new file mode 100644 index 0000000..b050795 Binary files /dev/null and b/zenithdarkprefs/Resources/iKA@2x.png differ diff --git a/zenithdarkprefs/Resources/iKA@3x.png b/zenithdarkprefs/Resources/iKA@3x.png new file mode 100644 index 0000000..accf143 Binary files /dev/null and b/zenithdarkprefs/Resources/iKA@3x.png differ diff --git a/zenithdarkprefs/Resources/mac-user669@2x.png b/zenithdarkprefs/Resources/mac-user669@2x.png new file mode 100644 index 0000000..d3041a4 Binary files /dev/null and b/zenithdarkprefs/Resources/mac-user669@2x.png differ diff --git a/zenithdarkprefs/Resources/mac-user669@3x.png b/zenithdarkprefs/Resources/mac-user669@3x.png new file mode 100644 index 0000000..882a9cc Binary files /dev/null and b/zenithdarkprefs/Resources/mac-user669@3x.png differ diff --git a/zenithdarkprefs/Resources/skitty@2x.png b/zenithdarkprefs/Resources/skitty@2x.png new file mode 100644 index 0000000..dbc4ef6 Binary files /dev/null and b/zenithdarkprefs/Resources/skitty@2x.png differ diff --git a/zenithdarkprefs/Resources/skitty@3x.png b/zenithdarkprefs/Resources/skitty@3x.png new file mode 100644 index 0000000..c1cef59 Binary files /dev/null and b/zenithdarkprefs/Resources/skitty@3x.png differ diff --git a/zenithdarkprefs/ZNDarkPrefsRootListController.h b/zenithdarkprefs/ZNDarkPrefsRootListController.h index 06168c1..bf77975 100644 --- a/zenithdarkprefs/ZNDarkPrefsRootListController.h +++ b/zenithdarkprefs/ZNDarkPrefsRootListController.h @@ -1,15 +1,11 @@ #import -#import - @import UIKit; // image for share button #define kImagePath @"/Library/Application Support/ZenithDark/ZNDark.png" -// @interface ZNDarkPrefsRootListController : PSListController - -@interface ZNDarkPrefsRootListController : HBRootListController +@interface ZNDarkPrefsRootListController : PSListController @property (nonatomic, strong) UIBlurEffect *respringBlur; @property (nonatomic, strong) UIVisualEffectView *respringEffectView; @property (nonatomic, strong) UIWindow *mainAppRootWindow; @@ -37,4 +33,3 @@ - (bool)suspend; - (void)terminate; @end - diff --git a/zenithdarkprefs/ZNDarkPrefsRootListController.m b/zenithdarkprefs/ZNDarkPrefsRootListController.m index dee38f2..16a63af 100644 --- a/zenithdarkprefs/ZNDarkPrefsRootListController.m +++ b/zenithdarkprefs/ZNDarkPrefsRootListController.m @@ -1,44 +1,14 @@ #import "ZNDarkPrefsRootListController.h" -#import - -#define THEME_COLOR \ - [UIColor colorWithRed:0.82 \ - green:0.64 \ - blue:0.00 \ - alpha:1.0]; @implementation ZNDarkPrefsRootListController -+ (UIColor *)hb_tintColor { - return THEME_COLOR; -} - -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; // share button for our tweak :P self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose target:self action:@selector(shareTapped)]; -} -- (void)viewDidLoad { - [super viewDidLoad]; - - if (@available(iOS 11, *)) { - self.navigationController.navigationBar.prefersLargeTitles = false; - self.navigationController.navigationItem.largeTitleDisplayMode = - UINavigationItemLargeTitleDisplayModeNever; - } -} - -- (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; - - if (@available(iOS 11, *)) { - self.navigationController.navigationBar.prefersLargeTitles = false; - self.navigationController.navigationItem.largeTitleDisplayMode = - UINavigationItemLargeTitleDisplayModeNever; - } } @@ -75,6 +45,23 @@ return _specifiers; } + +-(void)followMe { + NSURL *twitter = [NSURL URLWithString:@"https://twitter.com/mac_user669"]; + [[UIApplication sharedApplication] openURL:twitter options:@{} completionHandler:nil]; +} + +-(void)followiKA { + NSURL *twitter = [NSURL URLWithString:@"https://twitter.com/iKilledAppl3"]; + [[UIApplication sharedApplication] openURL:twitter options:@{} completionHandler:nil]; +} + +-(void)followSkitty { + NSURL *twitter = [NSURL URLWithString:@"https://twitter.com/SkittyBlock"]; + [[UIApplication sharedApplication] openURL:twitter options:@{} completionHandler:nil]; +} + + -(void)respring { NSTask *task = [[[NSTask alloc] init] autorelease]; [task setLaunchPath:@"/usr/bin/killall"]; @@ -88,7 +75,18 @@ UIAlertController *confirmRespringAlert = [UIAlertController alertControllerWithTitle:@"Apply Settings?" message:@"This will respring your device." preferredStyle:UIAlertControllerStyleActionSheet]; UIAlertAction *confirm = [UIAlertAction actionWithTitle:@"Respring" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) { - [self performSelector:@selector(respring) withObject:nil afterDelay:0.0]; + // blur then respring our device! + self.mainAppRootWindow = [UIApplication sharedApplication].keyWindow; + self.respringBlur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; + self.respringEffectView = [[UIVisualEffectView alloc] initWithEffect:self.respringBlur]; + self.respringEffectView.frame = [[UIScreen mainScreen] bounds]; + [self.mainAppRootWindow addSubview:self.respringEffectView]; + [UIView beginAnimations:nil context:NULL]; + [UIView setAnimationDuration:5.0]; + [self.respringEffectView setAlpha:0]; + [UIView commitAnimations]; + + [self performSelector:@selector(respring) withObject:nil afterDelay:3.0]; }];