1
0
mirror of https://github.com/Burrit0z/kai synced 2025-07-17 01:46:47 +00:00
This commit is contained in:
Burrit0z
2020-05-30 01:03:15 -04:00
parent bacbc3f44b
commit cbbbb6c827
15 changed files with 95 additions and 26 deletions

10
KAIBatteryCell.mm Normal file → Executable file
View File

@ -113,7 +113,9 @@
self.label.translatesAutoresizingMaskIntoConstraints = NO;
[self.label.leftAnchor constraintEqualToAnchor:self.glyphView.rightAnchor constant:4.5].active = YES;
[self.label.centerYAnchor constraintEqualToAnchor:blurPlatter.centerYAnchor].active = YES;
[self.label.rightAnchor constraintEqualToAnchor:self.percentLabel.leftAnchor constant:-4.5].active = YES;
if(!hidePercent) {
[self.label.rightAnchor constraintEqualToAnchor:self.percentLabel.leftAnchor constant:-4.5].active = YES;
}
[self.label.heightAnchor constraintEqualToConstant:25].active = YES;
self.glyphView.translatesAutoresizingMaskIntoConstraints = NO;
@ -128,6 +130,10 @@
[self.battery.widthAnchor constraintEqualToConstant:20].active = YES;
[self.battery.heightAnchor constraintEqualToConstant:10].active = YES;
if(hidePercent) {
[self.label.rightAnchor constraintEqualToAnchor:self.battery.leftAnchor constant:-4.5].active = YES;
}
}
return self;
@ -170,7 +176,7 @@
self.battery.chargePercent = (batteryPercentage*0.01);
[self.glyphView setImage:[self.device glyph]];
[self.heightAnchor constraintEqualToConstant:(bannerHeight + spacing)].active = YES;
[self.heightAnchor constraintEqualToConstant:(bannerHeight)].active = YES;
/*if(!self.height) {