This commit is contained in:
lillian rose winter 2019-09-10 23:47:37 -05:00
revize 6bfe681082
17 změnil soubory, kde provedl 224 přidání a 0 odebrání

binární
.DS_Store vendorováno Normal file

Binární soubor nebyl zobrazen.

2
.gitignore vendorováno Normal file
Zobrazit soubor

@ -0,0 +1,2 @@
.theos/
packages/

17
Makefile Normal file
Zobrazit soubor

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

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

@ -0,0 +1,5 @@
{
Filter = {
Bundles = ( "com.apple.UIKit" );
};
}

binární
bordersprefs/.DS_Store vendorováno Normal file

Binární soubor nebyl zobrazen.

Zobrazit soubor

@ -0,0 +1,7 @@
#import <Preferences/PSListController.h>
#import <CepheiPrefs/HBRootListController.h>
#import <CepheiPrefs/HBAppearanceSettings.h>
@interface BRDRootListController : PSListController
@end

Zobrazit soubor

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

@ -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ární
bordersprefs/Resources/.DS_Store vendorováno Normal file

Binární soubor nebyl zobrazen.

Zobrazit soubor

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

Zobrazit soubor

@ -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ární
bordersprefs/Resources/icon.png Normal file

Binární soubor nebyl zobrazen.

Za

Šířka:  |  Výška:  |  Velikost: 2.9 KiB

binární
bordersprefs/Resources/icon@2x.png Normal file

Binární soubor nebyl zobrazen.

Za

Šířka:  |  Výška:  |  Velikost: 8.2 KiB

binární
bordersprefs/Resources/icon@3x.png Normal file

Binární soubor nebyl zobrazen.

Za

Šířka:  |  Výška:  |  Velikost: 16 KiB

21
bordersprefs/entry.plist Normal file
Zobrazit soubor

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

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