The source code, duh.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Tweak.x 1.6KB

il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //import needed files/headers
  2. #import <SpringBoard/SpringBoard.h>
  3. #import <Cephei/HBPreferences.h>
  4. //Set up variables for use with Cephei
  5. static BOOL transparent;
  6. static BOOL hidden;
  7. static double setHeight;
  8. static double customOpacity;
  9. HBPreferences *preferences;
  10. //hook the dock
  11. %hook SBDockView
  12. //this deals with everything adjusting opacity/transparency
  13. -(void)setBackgroundAlpha:(double)arg1 {
  14. if (transparent == NO && hidden == NO) { //if not transparent and not hidden
  15. %orig(customOpacity);
  16. }else if (transparent || hidden) { // Note: || means or in objc
  17. %orig(0.0); //hides background of the dock (transparent)
  18. } else {
  19. NSLog(@"Dock not Transparent/hidden, no custom opacity\n");
  20. }
  21. }
  22. -(double)dockHeight {
  23. if (hidden) {
  24. return (-50); //just puts the dock barely off screen lol
  25. } else {
  26. return (%orig*setHeight); //sets custom height if dock is not set to hidden
  27. }
  28. }
  29. %end
  30. %ctor {
  31. preferences = [[HBPreferences alloc] initWithIdentifier:@"com.burritoz.dockifyprefs"];
  32. [preferences registerDefaults:@{ //defaults for prefernces
  33. @"setHeight": @1,
  34. @"customOpacity": @1,
  35. @"hidden": @NO
  36. }];
  37. [preferences registerBool:&transparent default:YES forKey:@"transparent"]; //registering transparent as a Boolean
  38. [preferences registerBool:&hidden default:NO forKey:@"hidden"]; //registering hidden as a Boolean
  39. [preferences registerDouble:(double *)&setHeight default:1 forKey:@"setHeight"]; //registering setHeigt as a double (number)
  40. [preferences registerDouble:(double *)&customOpacity default:1 forKey:@"customOpacity"]; //registering customOpacity as a double (number)
  41. }