Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
moved the icons into a subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandra authored and Alexandra committed Nov 24, 2022
1 parent 785a9e1 commit d1d4ad8
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions Tweak/BatteryBuddy.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ CGFloat override__UIBatteryView_chargePercent(_UIBatteryView* self, SEL _cmd) {
int actualPercentage = orig * 100;

if (actualPercentage <= 20 && !isCharging) {
[[self batteryBuddyStatusBarIconImageView] setImage:[UIImage imageWithContentsOfFile:@"/var/mobile/Documents/BatteryBuddy/StatusBarSad.png"]];
[[self batteryBuddyStatusBarIconImageView] setImage:[UIImage imageWithContentsOfFile:@"/var/mobile/Documents/dev.traurige/BatteryBuddy/StatusBarSad.png"]];
} else if (actualPercentage <= 49 && !isCharging) {
[[self batteryBuddyStatusBarIconImageView] setImage:[UIImage imageWithContentsOfFile:@"/var/mobile/Documents/BatteryBuddy/StatusBarNeutral.png"]];
[[self batteryBuddyStatusBarIconImageView] setImage:[UIImage imageWithContentsOfFile:@"/var/mobile/Documents/dev.traurige/BatteryBuddy/StatusBarNeutral.png"]];
} else if (actualPercentage > 49 && !isCharging) {
[[self batteryBuddyStatusBarIconImageView] setImage:[UIImage imageWithContentsOfFile:@"/var/mobile/Documents/BatteryBuddy/StatusBarHappy.png"]];
[[self batteryBuddyStatusBarIconImageView] setImage:[UIImage imageWithContentsOfFile:@"/var/mobile/Documents/dev.traurige/BatteryBuddy/StatusBarHappy.png"]];
} else if (isCharging) {
[[self batteryBuddyStatusBarIconImageView] setImage:[UIImage imageWithContentsOfFile:@"/var/mobile/Documents/BatteryBuddy/StatusBarHappy.png"]];
[[self batteryBuddyStatusBarIconImageView] setImage:[UIImage imageWithContentsOfFile:@"/var/mobile/Documents/dev.traurige/BatteryBuddy/StatusBarHappy.png"]];
}

[self updateIconColor];
Expand Down Expand Up @@ -97,7 +97,7 @@ void _UIBatteryView_refreshIcon(_UIBatteryView* self, SEL _cmd) {
[self setBatteryBuddyStatusBarChargerImageView:[[UIImageView alloc] initWithFrame:[self bounds]]];
[[self batteryBuddyStatusBarChargerImageView] setContentMode:UIViewContentModeScaleAspectFill];
[[self batteryBuddyStatusBarChargerImageView] setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
[[self batteryBuddyStatusBarChargerImageView] setImage:[UIImage imageWithContentsOfFile:@"/var/mobile/Documents/BatteryBuddy/StatusBarCharger.png"]];
[[self batteryBuddyStatusBarChargerImageView] setImage:[UIImage imageWithContentsOfFile:@"/var/mobile/Documents/dev.traurige/BatteryBuddy/StatusBarCharger.png"]];
if (![[self batteryBuddyStatusBarChargerImageView] isDescendantOfView:self]) {
[self addSubview:[self batteryBuddyStatusBarChargerImageView]];
}
Expand Down Expand Up @@ -148,7 +148,7 @@ void override_CSBatteryFillView_didMoveToWindow(CSBatteryFillView* self, SEL _cm
[self setBatteryBuddyLockScreenIconImageView:[[UIImageView alloc] initWithFrame:[self bounds]]];
[[self batteryBuddyLockScreenIconImageView] setContentMode:UIViewContentModeScaleAspectFill];
[[self batteryBuddyLockScreenIconImageView] setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
[[self batteryBuddyLockScreenIconImageView] setImage:[UIImage imageWithContentsOfFile:@"/var/mobile/Documents/BatteryBuddy/LockscreenHappy.png"]];
[[self batteryBuddyLockScreenIconImageView] setImage:[UIImage imageWithContentsOfFile:@"/var/mobile/Documents/dev.traurige/BatteryBuddy/LockScreenHappy.png"]];
}
[[self batteryBuddyLockScreenIconImageView] setImage:[[[self batteryBuddyLockScreenIconImageView] image] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]];
[[self batteryBuddyLockScreenIconImageView] setTintColor:[UIColor whiteColor]];
Expand All @@ -162,7 +162,7 @@ void override_CSBatteryFillView_didMoveToWindow(CSBatteryFillView* self, SEL _cm
[self setBatteryBuddyLockScreenChargerImageView:[[UIImageView alloc] initWithFrame:CGRectMake(self.bounds.origin.x - 25, self.bounds.origin.y, self.bounds.size.width, self.bounds.size.height)]];
[[self batteryBuddyLockScreenChargerImageView] setContentMode:UIViewContentModeScaleAspectFill];
[[self batteryBuddyLockScreenChargerImageView] setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
[[self batteryBuddyLockScreenChargerImageView] setImage:[UIImage imageWithContentsOfFile:@"/var/mobile/Documents/BatteryBuddy/LockscreenCharger.png"]];
[[self batteryBuddyLockScreenChargerImageView] setImage:[UIImage imageWithContentsOfFile:@"/var/mobile/Documents/dev.traurige/BatteryBuddy/LockScreenCharger.png"]];
}
[[self batteryBuddyLockScreenChargerImageView] setImage:[[[self batteryBuddyLockScreenChargerImageView] image] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]];
[[self batteryBuddyLockScreenChargerImageView] setTintColor:[UIColor whiteColor]];
Expand Down
2 changes: 1 addition & 1 deletion control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: dev.traurige.batterybuddy
Name: BatteryBuddy
Depends: firmware (>= 13.0), mobilesubstrate, preferenceloader
Conflicts: love.litten.batterybuddy
Version: 1.2
Version: 1.3
Architecture: iphoneos-arm
Description: Battery indicator, but cute
Maintainer: Traurige
Expand Down

0 comments on commit d1d4ad8

Please sign in to comment.