+@interface _UIBatteryView : UIView
+@property (assign,nonatomic) double bodyColorAlpha;
+@property (assign,nonatomic) double pinColorAlpha;
+-(void)setBodyColor:(UIColor *)arg1;
+-(void)setPinColor:(UIColor *)arg1;
+@end
+
%hook _UIBatteryView
-(void)setShowsPercentage:(BOOL)enabled
%orig(false);
}
+-(void)setChargingState:(NSInteger)state
+{
+ %orig;
+ if (state) {
+ [self setBodyColor:[UIColor systemGreenColor]];
+ [self setPinColor:[UIColor systemGreenColor]];
+ } else {
+ [self setBodyColor:[UIColor colorWithRed:1 green:1 blue:1 alpha:self.bodyColorAlpha]];
+ [self setPinColor:[UIColor colorWithRed:1 green:1 blue:1 alpha:self.pinColorAlpha]];
+ }
+}
+
%end
// vim: filetype=logos
Package: com.cameronkatri.batterypercent
Name: BatteryPercent
-Version: 0.0.1
+Version: 0.0.2
Architecture: iphoneos-arm
Description: An awesome MobileSubstrate tweak!
Maintainer: Cameron Katri <me@cameronkatri.com>