mirror of
https://github.com/Burrit0z/kai
synced 2025-07-17 01:46:47 +00:00
almost
This commit is contained in:
10
KAIBatteryCell.mm
Normal file → Executable file
10
KAIBatteryCell.mm
Normal file → Executable 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) {
|
||||
|
||||
|
Reference in New Issue
Block a user