🎉 init
This commit is contained in:
commit
6bfe681082
17 changed files with 224 additions and 0 deletions
BIN
.DS_Store
vendored
Normal file
BIN
.DS_Store
vendored
Normal file
Binary file not shown.
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.theos/
|
||||||
|
packages/
|
17
Makefile
Normal file
17
Makefile
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
INSTALL_TARGET_PROCESSES = SpringBoard
|
||||||
|
|
||||||
|
THEOS_DEVICE_IP = 192.168.1.182
|
||||||
|
|
||||||
|
include $(THEOS)/makefiles/common.mk
|
||||||
|
|
||||||
|
TWEAK_NAME = borders
|
||||||
|
|
||||||
|
borders_FILES = Tweak.x
|
||||||
|
borders_CFLAGS = -fobjc-arc
|
||||||
|
borders_FRAMEWORKS = UIKit
|
||||||
|
borders_EXTRA_FRAMEWORKS += Cephei
|
||||||
|
|
||||||
|
include $(THEOS_MAKE_PATH)/tweak.mk
|
||||||
|
|
||||||
|
SUBPROJECTS += bordersprefs
|
||||||
|
include $(THEOS_MAKE_PATH)/aggregate.mk
|
34
Tweak.x
Normal file
34
Tweak.x
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <Cephei/HBPreferences.h>
|
||||||
|
|
||||||
|
static bool enabled = true;
|
||||||
|
static int prefsCornerRadius = 10;
|
||||||
|
|
||||||
|
@interface _UIRootWindow : UIView
|
||||||
|
@property (setter=_setContinuousCornerRadius:, nonatomic) double _continuousCornerRadius;
|
||||||
|
- (double)_continuousCornerRadius;
|
||||||
|
- (void)_setContinuousCornerRadius:(double)arg1;
|
||||||
|
@end
|
||||||
|
|
||||||
|
%hook _UIRootWindow
|
||||||
|
- (void)layoutSubviews {
|
||||||
|
%orig;
|
||||||
|
if (enabled) {
|
||||||
|
self._continuousCornerRadius = prefsCornerRadius;
|
||||||
|
self.clipsToBounds = YES;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
void reloadPrefs() {
|
||||||
|
HBPreferences *file = [[HBPreferences alloc] initWithIdentifier:@"toys.lily.borderprefs"];
|
||||||
|
|
||||||
|
enabled = [([file objectForKey:@"enabled"] ?: @(YES)) boolValue];
|
||||||
|
// prefsCornerRadius = [([file objectForKey:@"borderradius"] ? : @(10)) intValue];
|
||||||
|
}
|
||||||
|
|
||||||
|
%ctor {
|
||||||
|
reloadPrefs();
|
||||||
|
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)reloadPrefs, CFSTR("toys.lily.borderprefs/ReloadPrefs"), NULL, kNilOptions);
|
||||||
|
}
|
5
borders.plist
Normal file
5
borders.plist
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
Filter = {
|
||||||
|
Bundles = ( "com.apple.UIKit" );
|
||||||
|
};
|
||||||
|
}
|
BIN
bordersprefs/.DS_Store
vendored
Normal file
BIN
bordersprefs/.DS_Store
vendored
Normal file
Binary file not shown.
7
bordersprefs/BRDRootListController.h
Normal file
7
bordersprefs/BRDRootListController.h
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#import <Preferences/PSListController.h>
|
||||||
|
#import <CepheiPrefs/HBRootListController.h>
|
||||||
|
#import <CepheiPrefs/HBAppearanceSettings.h>
|
||||||
|
|
||||||
|
@interface BRDRootListController : PSListController
|
||||||
|
|
||||||
|
@end
|
26
bordersprefs/BRDRootListController.m
Normal file
26
bordersprefs/BRDRootListController.m
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
#include "BRDRootListController.h"
|
||||||
|
|
||||||
|
@implementation BRDRootListController
|
||||||
|
|
||||||
|
- (instancetype)init {
|
||||||
|
self = [super init];
|
||||||
|
|
||||||
|
if (self) {
|
||||||
|
HBAppearanceSettings *appearanceSettings = [[HBAppearanceSettings alloc] init];
|
||||||
|
appearanceSettings.tintColor = [UIColor colorWithRed:0.4f green:0.0f blue:0.3f alpha:1];
|
||||||
|
appearanceSettings.tableViewCellSeparatorColor = [UIColor colorWithWhite:0 alpha:0];
|
||||||
|
self.hb_appearanceSettings = appearanceSettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSArray *)specifiers {
|
||||||
|
if (!_specifiers) {
|
||||||
|
_specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self];
|
||||||
|
}
|
||||||
|
|
||||||
|
return _specifiers;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
16
bordersprefs/Makefile
Normal file
16
bordersprefs/Makefile
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
include $(THEOS)/makefiles/common.mk
|
||||||
|
|
||||||
|
BUNDLE_NAME = bordersprefs
|
||||||
|
|
||||||
|
bordersprefs_FILES = BRDRootListController.m
|
||||||
|
bordersprefs_INSTALL_PATH = /Library/PreferenceBundles
|
||||||
|
bordersprefs_FRAMEWORKS = UIKit
|
||||||
|
bordersprefs_PRIVATE_FRAMEWORKS = Preferences
|
||||||
|
bordersprefs_CFLAGS = -fobjc-arc
|
||||||
|
bordersprefs_EXTRA_FRAMEWORKS = Cephei CepheiPrefs
|
||||||
|
|
||||||
|
include $(THEOS_MAKE_PATH)/bundle.mk
|
||||||
|
|
||||||
|
internal-stage::
|
||||||
|
$(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END)
|
||||||
|
$(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/bordersprefs.plist$(ECHO_END)
|
BIN
bordersprefs/Resources/.DS_Store
vendored
Normal file
BIN
bordersprefs/Resources/.DS_Store
vendored
Normal file
Binary file not shown.
24
bordersprefs/Resources/Info.plist
Normal file
24
bordersprefs/Resources/Info.plist
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>bordersprefs</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>toys.lily.bordersprefs</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>BNDL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0.0</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>BRDRootListController</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
63
bordersprefs/Resources/Root.plist
Normal file
63
bordersprefs/Resources/Root.plist
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>items</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>cellClass</key>
|
||||||
|
<string>HBTwitterCell</string>
|
||||||
|
<key>label</key>
|
||||||
|
<string>lily</string>
|
||||||
|
<key>user</key>
|
||||||
|
<string>lilyshibe</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>cell</key>
|
||||||
|
<string>PSSwitchCell</string>
|
||||||
|
<key>default</key>
|
||||||
|
<true/>
|
||||||
|
<key>defaults</key>
|
||||||
|
<string>toys.lily.borderprefs</string>
|
||||||
|
<key>label</key>
|
||||||
|
<string>enabled</string>
|
||||||
|
<key>key</key>
|
||||||
|
<string>enabled</string>
|
||||||
|
<key>alternateColors</key>
|
||||||
|
<true/>
|
||||||
|
<key>PostNotification</key>
|
||||||
|
<string>toys.lily.borderprefs/ReloadPrefs</string>
|
||||||
|
</dict>
|
||||||
|
<!-- <dict>
|
||||||
|
<key>cell</key>
|
||||||
|
<string>PSGroupCell</string>
|
||||||
|
<key>label</key>
|
||||||
|
<string>borders</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>cell</key>
|
||||||
|
<string>PSSliderCell</string>
|
||||||
|
<key>cellClass</key>
|
||||||
|
<string>HBDiscreteSliderTableCell</string>
|
||||||
|
<key>default</key>
|
||||||
|
<real>10</real>
|
||||||
|
<key>defaults</key>
|
||||||
|
<string>toys.lily.bordersprefs</string>
|
||||||
|
<key>min</key>
|
||||||
|
<real>0</real>
|
||||||
|
<key>max</key>
|
||||||
|
<real>50</real>
|
||||||
|
<key>showValue</key>
|
||||||
|
<true />
|
||||||
|
<key>key</key>
|
||||||
|
<string>borderradius</string>
|
||||||
|
<key>label</key>
|
||||||
|
<string>border radius</string>
|
||||||
|
<key>PostNotification</key>
|
||||||
|
<string>toys.lily.borderprefs/ReloadPrefs</string>
|
||||||
|
</dict> -->
|
||||||
|
</array>
|
||||||
|
<key>title</key>
|
||||||
|
<string>borders</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
BIN
bordersprefs/Resources/icon.png
Normal file
BIN
bordersprefs/Resources/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
bordersprefs/Resources/icon@2x.png
Normal file
BIN
bordersprefs/Resources/icon@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
BIN
bordersprefs/Resources/icon@3x.png
Normal file
BIN
bordersprefs/Resources/icon@3x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
21
bordersprefs/entry.plist
Normal file
21
bordersprefs/entry.plist
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>entry</key>
|
||||||
|
<dict>
|
||||||
|
<key>bundle</key>
|
||||||
|
<string>bordersprefs</string>
|
||||||
|
<key>cell</key>
|
||||||
|
<string>PSLinkCell</string>
|
||||||
|
<key>detail</key>
|
||||||
|
<string>BRDRootListController</string>
|
||||||
|
<key>icon</key>
|
||||||
|
<string>icon.png</string>
|
||||||
|
<key>isController</key>
|
||||||
|
<true/>
|
||||||
|
<key>label</key>
|
||||||
|
<string>borders</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
9
control
Normal file
9
control
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
Package: toys.lily.borders
|
||||||
|
Name: borders
|
||||||
|
Depends: mobilesubstrate, ws.hbang.common
|
||||||
|
Version: 0.0.1
|
||||||
|
Architecture: iphoneos-arm
|
||||||
|
Description: adds screen border radius
|
||||||
|
Maintainer: lillian rose winter
|
||||||
|
Author: lillian rose winter
|
||||||
|
Section: Tweaks
|
Loading…
Reference in a new issue