Parcourir la source

Use Cephei

master
mac-user669 il y a 4 ans
Parent
révision
8a2e4afc14
13 fichiers modifiés avec 102 ajouts et 61 suppressions
  1. +4
    -3
      Makefile
  2. +1
    -0
      Tweak.xm
  3. +1
    -1
      control
  4. +1
    -0
      zenithdarkprefs/Makefile
  5. +58
    -27
      zenithdarkprefs/Resources/Root.plist
  6. BIN
      zenithdarkprefs/Resources/iKA@2x.png
  7. BIN
      zenithdarkprefs/Resources/iKA@3x.png
  8. BIN
      zenithdarkprefs/Resources/mac-user669@2x.png
  9. BIN
      zenithdarkprefs/Resources/mac-user669@3x.png
  10. BIN
      zenithdarkprefs/Resources/skitty@2x.png
  11. BIN
      zenithdarkprefs/Resources/skitty@3x.png
  12. +6
    -1
      zenithdarkprefs/ZNDarkPrefsRootListController.h
  13. +31
    -29
      zenithdarkprefs/ZNDarkPrefsRootListController.m

+ 4
- 3
Makefile Voir le fichier

@@ -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"
install.exec "sbreload"

+ 1
- 0
Tweak.xm Voir le fichier

@@ -1,4 +1,5 @@
#import "ZenithDark.h"
#import <Cephei/HBPreferences.h>

/*


+ 1
- 1
control Voir le fichier

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

+ 1
- 0
zenithdarkprefs/Makefile Voir le fichier

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


+ 58
- 27
zenithdarkprefs/Resources/Root.plist Voir le fichier

@@ -4,6 +4,25 @@
<dict>
<key>items</key>
<array>

<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>headerCellClass</key>
<string>HBPackageNameHeaderCell</string>
<key>packageIdentifier</key>
<string>com.mac-user669.zenithdark</string>
<key>backgroundGradientColors</key>
<array>
<string>#D0A400</string>
<string>#D0A400</string>
</array>
<key>titleColor</key>
<string>#111111</string>
<key>subtitleColor</key>
<string>#444444</string>
</dict>

<dict>
<key>cell</key>
<string>PSGroupCell</string>
@@ -39,6 +58,8 @@
<string>PSButtonCell</string>
<key>label</key>
<string>Respring</string>
<key>cellClass</key>
<string>HBTintedTableCell</string>
<key>action</key>
<string>doAFancyRespring</string>
</dict>
@@ -51,15 +72,21 @@
<string>Conceptualized by yours truly.</string>
</dict>
<dict>
<key>icon</key>
<string>mac-user669.png</string>
<key>cell</key>
<string>PSButtonCell</string>
<key>label</key>
<string>@mac_user669</string>
<key>action</key>
<string>followMe</string>
</dict>
<key>cellClass</key>
<string>HBTwitterCell</string>
<key>label</key>
<string>mac-user669</string>
<key>user</key>
<string>mac_user669</string>
</dict>
<dict>
<key>cellClass</key>
<string>HBLinkTableCell</string>
<key>label</key>
<string>Donate</string>
<key>url</key>
<string>https://paypal.me/macuser669</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
@@ -67,15 +94,21 @@
<string>Coded most of the tweak.</string>
</dict>
<dict>
<key>icon</key>
<string>iKA.png</string>
<key>cell</key>
<string>PSButtonCell</string>
<key>label</key>
<string>@iKilledAppl3</string>
<key>action</key>
<string>followiKA</string>
</dict>
<key>cellClass</key>
<string>HBTwitterCell</string>
<key>label</key>
<string>iKilledAppl3</string>
<key>user</key>
<string>iKilledAppl3</string>
</dict>
<dict>
<key>cellClass</key>
<string>HBLinkTableCell</string>
<key>label</key>
<string>Donate</string>
<key>url</key>
<string>https://paypal.me/iKilledAppl3</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
@@ -83,15 +116,13 @@
<string>Helped with some of our preferences code and amongst other things.</string>
</dict>
<dict>
<key>icon</key>
<string>skitty.png</string>
<key>cell</key>
<string>PSButtonCell</string>
<key>label</key>
<string>@Skittyblock</string>
<key>action</key>
<string>followSkitty</string>
</dict>
<key>cellClass</key>
<string>HBTwitterCell</string>
<key>label</key>
<string>Skittyblock</string>
<key>user</key>
<string>Skittyblock</string>
</dict>
</array>
<key>title</key>
<string>ZenithDark</string>

BIN
zenithdarkprefs/Resources/iKA@2x.png Voir le fichier

Before After
Width: 59  |  Height: 59  |  Size: 8.1KB

BIN
zenithdarkprefs/Resources/iKA@3x.png Voir le fichier

Before After
Width: 80  |  Height: 80  |  Size: 13KB

BIN
zenithdarkprefs/Resources/mac-user669@2x.png Voir le fichier

Before After
Width: 59  |  Height: 59  |  Size: 6.5KB

BIN
zenithdarkprefs/Resources/mac-user669@3x.png Voir le fichier

Before After
Width: 80  |  Height: 80  |  Size: 10KB

BIN
zenithdarkprefs/Resources/skitty@2x.png Voir le fichier

Before After
Width: 59  |  Height: 59  |  Size: 3.9KB

BIN
zenithdarkprefs/Resources/skitty@3x.png Voir le fichier

Before After
Width: 80  |  Height: 80  |  Size: 5.4KB

+ 6
- 1
zenithdarkprefs/ZNDarkPrefsRootListController.h Voir le fichier

@@ -1,11 +1,15 @@
#import <Preferences/PSListController.h>
#import <CepheiPrefs/HBRootListController.h>

@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


+ 31
- 29
zenithdarkprefs/ZNDarkPrefsRootListController.m Voir le fichier

@@ -1,14 +1,44 @@
#import "ZNDarkPrefsRootListController.h"
#import <CepheiPrefs/HBAppearanceSettings.h>

#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];

}];


Chargement…
Annuler
Enregistrer