瀏覽代碼

before break

pull/1/head
Burrit0z 4 年之前
父節點
當前提交
193ebb31f1
共有 2 個文件被更改,包括 12 次插入3 次删除
  1. +1
    -1
      KAIBattery.mm
  2. +11
    -2
      Kai.xm

+ 1
- 1
KAIBattery.mm 查看文件

@@ -26,6 +26,7 @@ long long lastPercentage;
if(!self.isUpdating) {
self.isUpdating = YES;
self.number = 0;
float y = 0;
BCBatteryDeviceController *bcb = [BCBatteryDeviceController sharedInstance];
NSArray *devices = MSHookIvar<NSArray *>(bcb, "_sortedDevices");

@@ -43,7 +44,6 @@ long long lastPercentage;
BOOL charging = MSHookIvar<long long>(device, "_charging");
BOOL LPM = MSHookIvar<BOOL>(device, "_batterySaverModeActive");

float y;
if(charging) {

UIVisualEffectView *blank = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]];

+ 11
- 2
Kai.xm 查看文件

@@ -90,10 +90,12 @@ CGRect originalBattery;
setFrame = YES;
batteryWidget = self;
}
[self KaiUpdate];
}

%new
-(void)KaiUpdate {
[UIView animateWithDuration:0.3 animations:^{
self.frame = CGRectMake(
original.origin.x,
original.origin.y + (self.battery.number * 85),
@@ -101,12 +103,14 @@ CGRect originalBattery;
original.size.height
);

/*self.battery.frame = CGRectMake(
self.battery.frame = CGRectMake(
originalBattery.origin.x,
originalBattery.origin.y - (self.battery.number * 85) + 85,
originalBattery.size.width,
originalBattery.size.height
);*/
);
}];
}
%end

@@ -128,4 +132,9 @@ CGRect originalBattery;
});
}
%end

%hook CSScrollView


%end

Loading…
取消
儲存