diff --git a/.theos/_/DEBIAN/control b/.theos/_/DEBIAN/control new file mode 100644 index 0000000..5618067 --- /dev/null +++ b/.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 diff --git a/.theos/_/Library/MobileSubstrate/DynamicLibraries/ZenithDark.dylib b/.theos/_/Library/MobileSubstrate/DynamicLibraries/ZenithDark.dylib new file mode 100755 index 0000000..f11b145 Binary files /dev/null and b/.theos/_/Library/MobileSubstrate/DynamicLibraries/ZenithDark.dylib differ diff --git a/.theos/_/Library/MobileSubstrate/DynamicLibraries/ZenithDark.plist b/.theos/_/Library/MobileSubstrate/DynamicLibraries/ZenithDark.plist new file mode 100644 index 0000000..10dc654 --- /dev/null +++ b/.theos/_/Library/MobileSubstrate/DynamicLibraries/ZenithDark.plist @@ -0,0 +1 @@ +{ Filter = { Bundles = ( "com.apple.springboard" ); }; } diff --git a/.theos/build_session b/.theos/build_session new file mode 100644 index 0000000..e69de29 diff --git a/.theos/fakeroot b/.theos/fakeroot new file mode 100644 index 0000000..e69de29 diff --git a/.theos/last_package b/.theos/last_package new file mode 100644 index 0000000..08a1c15 --- /dev/null +++ b/.theos/last_package @@ -0,0 +1 @@ +./packages/com.mac-user669.zenithdark_0.0.1-1+debug_iphoneos-arm.deb diff --git a/.theos/obj/debug/.stamp b/.theos/obj/debug/.stamp new file mode 100644 index 0000000..e69de29 diff --git a/.theos/obj/debug/ZenithDark.dylib b/.theos/obj/debug/ZenithDark.dylib new file mode 100755 index 0000000..f11b145 Binary files /dev/null and b/.theos/obj/debug/ZenithDark.dylib differ diff --git a/.theos/obj/debug/arm64/Tweak.x.a3df4fbe.Td b/.theos/obj/debug/arm64/Tweak.x.a3df4fbe.Td new file mode 100644 index 0000000..4262ee3 --- /dev/null +++ b/.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: diff --git a/.theos/obj/debug/arm64/Tweak.x.a3df4fbe.o b/.theos/obj/debug/arm64/Tweak.x.a3df4fbe.o new file mode 100644 index 0000000..497de5e Binary files /dev/null and b/.theos/obj/debug/arm64/Tweak.x.a3df4fbe.o differ diff --git a/.theos/obj/debug/arm64/ZenithDark.dylib b/.theos/obj/debug/arm64/ZenithDark.dylib new file mode 100755 index 0000000..4a89064 Binary files /dev/null and b/.theos/obj/debug/arm64/ZenithDark.dylib differ diff --git a/.theos/obj/debug/arm64/ZenithDark.dylib.dSYM/Contents/Info.plist b/.theos/obj/debug/arm64/ZenithDark.dylib.dSYM/Contents/Info.plist new file mode 100644 index 0000000..1670f3b --- /dev/null +++ b/.theos/obj/debug/arm64/ZenithDark.dylib.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.ZenithDark.dylib + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/.theos/obj/debug/arm64/ZenithDark.dylib.dSYM/Contents/Resources/DWARF/ZenithDark.dylib b/.theos/obj/debug/arm64/ZenithDark.dylib.dSYM/Contents/Resources/DWARF/ZenithDark.dylib new file mode 100644 index 0000000..bc264b4 Binary files /dev/null and b/.theos/obj/debug/arm64/ZenithDark.dylib.dSYM/Contents/Resources/DWARF/ZenithDark.dylib differ diff --git a/.theos/obj/debug/arm64e/Tweak.x.27fea1d1.Td b/.theos/obj/debug/arm64e/Tweak.x.27fea1d1.Td new file mode 100644 index 0000000..b0c61df --- /dev/null +++ b/.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: diff --git a/.theos/obj/debug/arm64e/Tweak.x.27fea1d1.o b/.theos/obj/debug/arm64e/Tweak.x.27fea1d1.o new file mode 100644 index 0000000..a142f96 Binary files /dev/null and b/.theos/obj/debug/arm64e/Tweak.x.27fea1d1.o differ diff --git a/.theos/obj/debug/arm64e/ZenithDark.dylib b/.theos/obj/debug/arm64e/ZenithDark.dylib new file mode 100755 index 0000000..a66fa73 Binary files /dev/null and b/.theos/obj/debug/arm64e/ZenithDark.dylib differ diff --git a/.theos/obj/debug/arm64e/ZenithDark.dylib.dSYM/Contents/Info.plist b/.theos/obj/debug/arm64e/ZenithDark.dylib.dSYM/Contents/Info.plist new file mode 100644 index 0000000..1670f3b --- /dev/null +++ b/.theos/obj/debug/arm64e/ZenithDark.dylib.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.ZenithDark.dylib + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/.theos/obj/debug/arm64e/ZenithDark.dylib.dSYM/Contents/Resources/DWARF/ZenithDark.dylib b/.theos/obj/debug/arm64e/ZenithDark.dylib.dSYM/Contents/Resources/DWARF/ZenithDark.dylib new file mode 100644 index 0000000..eb532be Binary files /dev/null and b/.theos/obj/debug/arm64e/ZenithDark.dylib.dSYM/Contents/Resources/DWARF/ZenithDark.dylib differ diff --git a/.theos/packages/com.mac-user669.zenithdark-0.0.1 b/.theos/packages/com.mac-user669.zenithdark-0.0.1 new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/.theos/packages/com.mac-user669.zenithdark-0.0.1 @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/Tweak.x b/Tweak.x index 57c7cc7..7354170 100644 --- a/Tweak.x +++ b/Tweak.x @@ -1,14 +1,17 @@ - -// Basically all of this was written by J.K. Hayslip, aka iKilledAppl3. He's a huge help, go follow him on twitter. - -// Idea by Cooper Hull, aka mac-user669. Thanks to iKA for the help! - -//––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––\\ - // We make an interface to let Theos know that ZNGrabberAccessoryView is of type UIImageView; @interface ZNGrabberAccessoryView : UIImageView @end +BOOL kDarkModeEnabled; + +/* + +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 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. diff --git a/packages/com.mac-user669.zenithdark_0.0.1-1+debug_iphoneos-arm.deb b/packages/com.mac-user669.zenithdark_0.0.1-1+debug_iphoneos-arm.deb index a7d8d97..86a05f3 100644 Binary files a/packages/com.mac-user669.zenithdark_0.0.1-1+debug_iphoneos-arm.deb and b/packages/com.mac-user669.zenithdark_0.0.1-1+debug_iphoneos-arm.deb differ