From ffd3608f2c6a9b314a7bcc5593e8efae7857ba4b Mon Sep 17 00:00:00 2001 From: Burrit0z Date: Wed, 3 Jun 2020 14:17:54 -0400 Subject: [PATCH] :no_mouth: --- KAIBatteryCell.mm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/KAIBatteryCell.mm b/KAIBatteryCell.mm index 77d9208..01661dc 100755 --- a/KAIBatteryCell.mm +++ b/KAIBatteryCell.mm @@ -105,9 +105,8 @@ [blur.heightAnchor constraintEqualToAnchor:blurPlatter.heightAnchor].active = YES; self.percentLabel.translatesAutoresizingMaskIntoConstraints = NO; - [self.percentLabel.leftAnchor constraintEqualToAnchor:blurPlatter.rightAnchor constant:(- 96)].active = YES; [self.percentLabel.centerYAnchor constraintEqualToAnchor:blurPlatter.centerYAnchor].active = YES; - [self.percentLabel.widthAnchor constraintEqualToConstant:37].active = YES; + [self.percentLabel.widthAnchor constraintEqualToConstant:32].active = YES; [self.percentLabel.heightAnchor constraintEqualToConstant:12].active = YES; self.label.translatesAutoresizingMaskIntoConstraints = NO; @@ -115,6 +114,8 @@ [self.label.centerYAnchor constraintEqualToAnchor:blurPlatter.centerYAnchor].active = YES; if(!hidePercent) { [self.label.rightAnchor constraintEqualToAnchor:self.percentLabel.leftAnchor constant:-4.5].active = YES; + } else { + [self.label.rightAnchor constraintEqualToAnchor:self.label.leftAnchor].active = YES; } [self.label.heightAnchor constraintEqualToConstant:25].active = YES; @@ -130,6 +131,8 @@ [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(hidePercent) { [self.label.rightAnchor constraintEqualToAnchor:self.battery.leftAnchor constant:-4.5].active = YES; }