소스 검색

initial dark/light mode support, still requires a respring

master
Cooper Hull 4 년 전
부모
커밋
668bae64c1
21개의 변경된 파일108개의 추가작업 그리고 11개의 파일을 삭제
  1. +10
    -0
      .theos/_/DEBIAN/control
  2. BIN
      .theos/_/Library/MobileSubstrate/DynamicLibraries/ZenithDark.dylib
  3. +1
    -0
      .theos/_/Library/MobileSubstrate/DynamicLibraries/ZenithDark.plist
  4. +0
    -0
      .theos/build_session
  5. +0
    -0
      .theos/fakeroot
  6. +1
    -0
      .theos/last_package
  7. +0
    -0
      .theos/obj/debug/.stamp
  8. BIN
      .theos/obj/debug/ZenithDark.dylib
  9. +17
    -0
      .theos/obj/debug/arm64/Tweak.x.a3df4fbe.Td
  10. BIN
      .theos/obj/debug/arm64/Tweak.x.a3df4fbe.o
  11. BIN
      .theos/obj/debug/arm64/ZenithDark.dylib
  12. +20
    -0
      .theos/obj/debug/arm64/ZenithDark.dylib.dSYM/Contents/Info.plist
  13. BIN
      .theos/obj/debug/arm64/ZenithDark.dylib.dSYM/Contents/Resources/DWARF/ZenithDark.dylib
  14. +17
    -0
      .theos/obj/debug/arm64e/Tweak.x.27fea1d1.Td
  15. BIN
      .theos/obj/debug/arm64e/Tweak.x.27fea1d1.o
  16. BIN
      .theos/obj/debug/arm64e/ZenithDark.dylib
  17. +20
    -0
      .theos/obj/debug/arm64e/ZenithDark.dylib.dSYM/Contents/Info.plist
  18. BIN
      .theos/obj/debug/arm64e/ZenithDark.dylib.dSYM/Contents/Resources/DWARF/ZenithDark.dylib
  19. +1
    -0
      .theos/packages/com.mac-user669.zenithdark-0.0.1
  20. +21
    -11
      Tweak.x
  21. BIN
      packages/com.mac-user669.zenithdark_0.0.1-1+debug_iphoneos-arm.deb

+ 10
- 0
.theos/_/DEBIAN/control 파일 보기

@@ -0,0 +1,10 @@
Package: com.mac-user669.zenithdark
Name: ZenithDark
Depends: mobilesubstrate
Architecture: iphoneos-arm
Description: An awesome MobileSubstrate tweak!
Maintainer: mac-user669
Author: mac-user669
Section: Tweaks
Version: 0.0.1-1+debug
Installed-Size: 168

BIN
.theos/_/Library/MobileSubstrate/DynamicLibraries/ZenithDark.dylib 파일 보기


+ 1
- 0
.theos/_/Library/MobileSubstrate/DynamicLibraries/ZenithDark.plist 파일 보기

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

+ 0
- 0
.theos/build_session 파일 보기


+ 0
- 0
.theos/fakeroot 파일 보기


+ 1
- 0
.theos/last_package 파일 보기

@@ -0,0 +1 @@
./packages/com.mac-user669.zenithdark_0.0.1-1+debug_iphoneos-arm.deb

+ 0
- 0
.theos/obj/debug/.stamp 파일 보기


BIN
.theos/obj/debug/ZenithDark.dylib 파일 보기


+ 17
- 0
.theos/obj/debug/arm64/Tweak.x.a3df4fbe.Td 파일 보기

@@ -0,0 +1,17 @@
/Users/cooperhull/Desktop/Tweaks/ZenithDark/.theos/obj/debug/arm64/Tweak.x.a3df4fbe.o: \
/Users/cooperhull/Desktop/Tweaks/ZenithDark/.theos/obj/debug/arm64/Tweak.x.m \
/Users/cooperhull/theos/Prefix.pch \
/Users/cooperhull/theos/vendor/include/_Prefix/BackwardsCompat.h \
/Users/cooperhull/theos/vendor/include/_Prefix/IOSMacros.h \
/Users/cooperhull/theos/vendor/include/HBLog.h \
/Users/cooperhull/theos/vendor/include/substrate.h

/Users/cooperhull/theos/Prefix.pch:

/Users/cooperhull/theos/vendor/include/_Prefix/BackwardsCompat.h:

/Users/cooperhull/theos/vendor/include/_Prefix/IOSMacros.h:

/Users/cooperhull/theos/vendor/include/HBLog.h:

/Users/cooperhull/theos/vendor/include/substrate.h:

BIN
.theos/obj/debug/arm64/Tweak.x.a3df4fbe.o 파일 보기


BIN
.theos/obj/debug/arm64/ZenithDark.dylib 파일 보기


+ 20
- 0
.theos/obj/debug/arm64/ZenithDark.dylib.dSYM/Contents/Info.plist 파일 보기

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.ZenithDark.dylib</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

BIN
.theos/obj/debug/arm64/ZenithDark.dylib.dSYM/Contents/Resources/DWARF/ZenithDark.dylib 파일 보기


+ 17
- 0
.theos/obj/debug/arm64e/Tweak.x.27fea1d1.Td 파일 보기

@@ -0,0 +1,17 @@
/Users/cooperhull/Desktop/Tweaks/ZenithDark/.theos/obj/debug/arm64e/Tweak.x.27fea1d1.o: \
/Users/cooperhull/Desktop/Tweaks/ZenithDark/.theos/obj/debug/arm64e/Tweak.x.m \
/Users/cooperhull/theos/Prefix.pch \
/Users/cooperhull/theos/vendor/include/_Prefix/BackwardsCompat.h \
/Users/cooperhull/theos/vendor/include/_Prefix/IOSMacros.h \
/Users/cooperhull/theos/vendor/include/HBLog.h \
/Users/cooperhull/theos/vendor/include/substrate.h

/Users/cooperhull/theos/Prefix.pch:

/Users/cooperhull/theos/vendor/include/_Prefix/BackwardsCompat.h:

/Users/cooperhull/theos/vendor/include/_Prefix/IOSMacros.h:

/Users/cooperhull/theos/vendor/include/HBLog.h:

/Users/cooperhull/theos/vendor/include/substrate.h:

BIN
.theos/obj/debug/arm64e/Tweak.x.27fea1d1.o 파일 보기


BIN
.theos/obj/debug/arm64e/ZenithDark.dylib 파일 보기


+ 20
- 0
.theos/obj/debug/arm64e/ZenithDark.dylib.dSYM/Contents/Info.plist 파일 보기

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.ZenithDark.dylib</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

BIN
.theos/obj/debug/arm64e/ZenithDark.dylib.dSYM/Contents/Resources/DWARF/ZenithDark.dylib 파일 보기


+ 1
- 0
.theos/packages/com.mac-user669.zenithdark-0.0.1 파일 보기

@@ -0,0 +1 @@
1

+ 21
- 11
Tweak.x 파일 보기

@@ -1,14 +1,17 @@
// We make an interface to let Theos know that ZNGrabberAccessoryView is of type UIImageView;
@interface ZNGrabberAccessoryView : UIImageView
@end

// Basically all of this was written by J.K. Hayslip, aka iKilledAppl3. He's a huge help, go follow him on twitter.
BOOL kDarkModeEnabled;

// Idea by Cooper Hull, aka mac-user669. Thanks to iKA for the help!
/*

//––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––\\
Colorize Zenith's Grabber view with ease!
Copyright 2020 J.K. Hayslip (@iKilledAppl3) & ToxicAppl3 INSDC/iKilledAppl3 LLC.
All code was written for learning purposes and credit must be given to the original author.

// We make an interface to let Theos know that ZNGrabberAccessoryView is of type UIImageView;
@interface ZNGrabberAccessoryView : UIImageView
@end

*/

// We then import UIKit so we can override the color property without this Theos doesn't have a clue what those properties are.
@import UIKit;
@@ -16,19 +19,26 @@

//We then hook the class in this case Zenith's grabber view is called “ZNGrabberAccessoryView”
%hook ZNGrabberAccessoryView
// The method we then modify is this method that is called from UIImageView to set the backgroundColor of the image view.
// the method we then modify is this method that is called from UIImageView to set the backgroundColor of the image view.
// Since the grabber view is of type UIImageView we can modify this method :)

-(void)setBackgroundColor:(UIColor *)backgroundColor {
//Call the original function then pass our custom argument to the backgroundColor argument as shown below.
%orig([UIColor colorWithWhite:0.0 alpha:0.44]);
//call the original function then pass our custom argument to the backgroundColor argument as shown below.
kDarkModeEnabled = ([UITraitCollection currentTraitCollection].userInterfaceStyle == UIUserInterfaceStyleDark);
if (kDarkModeEnabled) {
%orig([UIColor colorWithWhite:0.0 alpha:0.44]);
}
else {
%orig;
}


}

// We need to make sure we tell theos that we are finished hooking this class not doing so with cause the end of the world :P
// we need to make sure we tell theos that we are finished hooking this class not doing so with cause the end of the world :P
%end

// Our constructor
// our constructor
%ctor {

// We use this to make sure we load Zenith's dynamic library at runtime so we can modify it with our tweak.

BIN
packages/com.mac-user669.zenithdark_0.0.1-1+debug_iphoneos-arm.deb 파일 보기


Loading…
취소
저장