1
0
mirror of https://github.com/Burrit0z/kai synced 2025-07-04 14:36:47 +00:00

CENTER % LABEL

This commit is contained in:
Burrit0z
2020-06-03 14:42:33 -04:00
parent ffd3608f2c
commit 86aa53089b
4 changed files with 29 additions and 18 deletions

View File

@ -126,23 +126,23 @@
[self.glyphView.heightAnchor constraintEqualToConstant:glyphSize].active = YES;
self.battery.translatesAutoresizingMaskIntoConstraints = NO;
[self.battery.leftAnchor constraintEqualToAnchor:blurPlatter.rightAnchor constant:(- 49)].active = YES;
[self.battery.rightAnchor constraintEqualToAnchor:blurPlatter.rightAnchor constant:- 20.5].active = YES;
[self.battery.centerYAnchor constraintEqualToAnchor:blurPlatter.centerYAnchor].active = YES;
[self.battery.widthAnchor constraintEqualToConstant:20].active = YES;
[self.battery.heightAnchor constraintEqualToConstant:10].active = YES;
[self.percentLabel.rightAnchor constraintEqualToAnchor:self.battery.leftAnchor constant:-4.5].active = YES;
if(!hideDeviceLabel) {
[self.percentLabel.rightAnchor constraintEqualToAnchor:self.battery.leftAnchor constant:-4.5].active = YES;
} else if(hideDeviceLabel) {
[self.percentLabel.centerXAnchor constraintEqualToAnchor:blurPlatter.centerXAnchor].active = YES;
}
if(hidePercent) {
[self.label.rightAnchor constraintEqualToAnchor:self.battery.leftAnchor constant:-4.5].active = YES;
}
[self.heightAnchor constraintEqualToConstant:(bannerHeight + spacing)].active = YES;
if(kaiAlign==0) {
[self.widthAnchor constraintEqualToConstant:(self.frame.size.width)].active = YES;
} else {
[self.widthAnchor constraintEqualToAnchor:blurPlatter.widthAnchor].active = YES;
}
[self.widthAnchor constraintEqualToAnchor:blurPlatter.widthAnchor].active = YES;
}