diff --git a/Makefile b/Makefile index 5b25f1e..e388476 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,9 @@ include $(THEOS)/makefiles/common.mk TWEAK_NAME = ZenithDark -ZenithDark_FILES = Tweak.xm -ZenithDark_FRAMEWORKS = UIKit CoreGraphics +$(TWEAK_NAME)_FILES = Tweak.xm +$(TWEAK_NAME)_FRAMEWORKS = UIKit CoreGraphics +$(TWEAK_NAME)_EXTRA_FRAMEWORKS += Cephei CepheiPrefs include $(THEOS_MAKE_PATH)/tweak.mk @@ -15,4 +16,4 @@ SUBPROJECTS += zenithdarkprefs include $(THEOS_MAKE_PATH)/aggregate.mk after-install:: - install.exec "sbreload" \ No newline at end of file + install.exec "sbreload" diff --git a/Tweak.xm b/Tweak.xm index 7302a66..9436200 100644 --- a/Tweak.xm +++ b/Tweak.xm @@ -1,4 +1,5 @@ #import "ZenithDark.h" +#import /* diff --git a/control b/control index 53b2813..a0af5a5 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 +Depends: mobilesubstrate, preferenceloader, com.muirey03.zenith, ws.hbang.common (>= 1.14) Section: Tweaks Description: Changes Zeniths tabs to a dark blur Author: mac-user669 diff --git a/zenithdarkprefs/Makefile b/zenithdarkprefs/Makefile index 1c399e6..b2ae57c 100644 --- a/zenithdarkprefs/Makefile +++ b/zenithdarkprefs/Makefile @@ -11,6 +11,7 @@ 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 e32dd84..6e21174 100644 --- a/zenithdarkprefs/Resources/Root.plist +++ b/zenithdarkprefs/Resources/Root.plist @@ -4,6 +4,25 @@ items + + + cell + PSGroupCell + headerCellClass + HBPackageNameHeaderCell + packageIdentifier + com.mac-user669.zenithdark + backgroundGradientColors + + #D0A400 + #D0A400 + + titleColor + #111111 + subtitleColor + #444444 + + cell PSGroupCell @@ -39,6 +58,8 @@ PSButtonCell label Respring + cellClass + HBTintedTableCell action doAFancyRespring @@ -51,15 +72,21 @@ Conceptualized by yours truly. - icon - mac-user669.png - cell - PSButtonCell - label - @mac_user669 - action - followMe - + cellClass + HBTwitterCell + label + mac-user669 + user + mac_user669 + + + cellClass + HBLinkTableCell + label + Donate + url + https://paypal.me/macuser669 + cell PSGroupCell @@ -67,15 +94,21 @@ Coded most of the tweak. - icon - iKA.png - cell - PSButtonCell - label - @iKilledAppl3 - action - followiKA - + cellClass + HBTwitterCell + label + iKilledAppl3 + user + iKilledAppl3 + + + cellClass + HBLinkTableCell + label + Donate + url + https://paypal.me/iKilledAppl3 + cell PSGroupCell @@ -83,15 +116,13 @@ Helped with some of our preferences code and amongst other things. - icon - skitty.png - cell - PSButtonCell - label - @Skittyblock - action - followSkitty - + cellClass + HBTwitterCell + label + Skittyblock + user + Skittyblock + title ZenithDark diff --git a/zenithdarkprefs/Resources/iKA@2x.png b/zenithdarkprefs/Resources/iKA@2x.png deleted file mode 100644 index b050795..0000000 Binary files a/zenithdarkprefs/Resources/iKA@2x.png and /dev/null differ diff --git a/zenithdarkprefs/Resources/iKA@3x.png b/zenithdarkprefs/Resources/iKA@3x.png deleted file mode 100644 index accf143..0000000 Binary files a/zenithdarkprefs/Resources/iKA@3x.png and /dev/null differ diff --git a/zenithdarkprefs/Resources/mac-user669@2x.png b/zenithdarkprefs/Resources/mac-user669@2x.png deleted file mode 100644 index d3041a4..0000000 Binary files a/zenithdarkprefs/Resources/mac-user669@2x.png and /dev/null differ diff --git a/zenithdarkprefs/Resources/mac-user669@3x.png b/zenithdarkprefs/Resources/mac-user669@3x.png deleted file mode 100644 index 882a9cc..0000000 Binary files a/zenithdarkprefs/Resources/mac-user669@3x.png and /dev/null differ diff --git a/zenithdarkprefs/Resources/skitty@2x.png b/zenithdarkprefs/Resources/skitty@2x.png deleted file mode 100644 index dbc4ef6..0000000 Binary files a/zenithdarkprefs/Resources/skitty@2x.png and /dev/null differ diff --git a/zenithdarkprefs/Resources/skitty@3x.png b/zenithdarkprefs/Resources/skitty@3x.png deleted file mode 100644 index c1cef59..0000000 Binary files a/zenithdarkprefs/Resources/skitty@3x.png and /dev/null differ diff --git a/zenithdarkprefs/ZNDarkPrefsRootListController.h b/zenithdarkprefs/ZNDarkPrefsRootListController.h index bf77975..06168c1 100644 --- a/zenithdarkprefs/ZNDarkPrefsRootListController.h +++ b/zenithdarkprefs/ZNDarkPrefsRootListController.h @@ -1,11 +1,15 @@ #import +#import + @import UIKit; // image for share button #define kImagePath @"/Library/Application Support/ZenithDark/ZNDark.png" -@interface ZNDarkPrefsRootListController : PSListController +// @interface ZNDarkPrefsRootListController : PSListController + +@interface ZNDarkPrefsRootListController : HBRootListController @property (nonatomic, strong) UIBlurEffect *respringBlur; @property (nonatomic, strong) UIVisualEffectView *respringEffectView; @property (nonatomic, strong) UIWindow *mainAppRootWindow; @@ -33,3 +37,4 @@ - (bool)suspend; - (void)terminate; @end + diff --git a/zenithdarkprefs/ZNDarkPrefsRootListController.m b/zenithdarkprefs/ZNDarkPrefsRootListController.m index 16a63af..dee38f2 100644 --- a/zenithdarkprefs/ZNDarkPrefsRootListController.m +++ b/zenithdarkprefs/ZNDarkPrefsRootListController.m @@ -1,14 +1,44 @@ #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; + } } @@ -45,23 +75,6 @@ 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"]; @@ -75,18 +88,7 @@ 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) { - // 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]; + [self performSelector:@selector(respring) withObject:nil afterDelay:0.0]; }];