Browse Source

🎉 init

master
lillian rose winter 8 months ago
commit
6bfe681082
17 changed files with 224 additions and 0 deletions
  1. BIN
      .DS_Store
  2. +2
    -0
      .gitignore
  3. +17
    -0
      Makefile
  4. +34
    -0
      Tweak.x
  5. +5
    -0
      borders.plist
  6. BIN
      bordersprefs/.DS_Store
  7. +7
    -0
      bordersprefs/BRDRootListController.h
  8. +26
    -0
      bordersprefs/BRDRootListController.m
  9. +16
    -0
      bordersprefs/Makefile
  10. BIN
      bordersprefs/Resources/.DS_Store
  11. +24
    -0
      bordersprefs/Resources/Info.plist
  12. +63
    -0
      bordersprefs/Resources/Root.plist
  13. BIN
      bordersprefs/Resources/icon.png
  14. BIN
      bordersprefs/Resources/[email protected]
  15. BIN
      bordersprefs/Resources/[email protected]
  16. +21
    -0
      bordersprefs/entry.plist
  17. +9
    -0
      control

BIN
.DS_Store View File


+ 2
- 0
.gitignore View File

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

+ 17
- 0
Makefile View 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
- 0
Tweak.x View 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
- 0
borders.plist View File

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

BIN
bordersprefs/.DS_Store View File


+ 7
- 0
bordersprefs/BRDRootListController.h View File

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

@interface BRDRootListController : PSListController

@end

+ 26
- 0
bordersprefs/BRDRootListController.m View 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
- 0
bordersprefs/Makefile View 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 View File


+ 24
- 0
bordersprefs/Resources/Info.plist View 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
- 0
bordersprefs/Resources/Root.plist View 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 View File

Before After
Width: 29  |  Height: 29  |  Size: 2.9 KiB

BIN
bordersprefs/Resources/[email protected] View File

Before After
Width: 58  |  Height: 58  |  Size: 8.2 KiB

BIN
bordersprefs/Resources/[email protected] View File

Before After
Width: 87  |  Height: 87  |  Size: 16 KiB

+ 21
- 0
bordersprefs/entry.plist View 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
- 0
control View 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…
Cancel
Save