From c77f972168dc0dd9d27b84bf200be51824556b10 Mon Sep 17 00:00:00 2001 From: Burrit0z Date: Tue, 2 Jun 2020 17:44:04 -0400 Subject: [PATCH] horizontal --- KAIBatteryCell.mm | 6 +++++- KAIBatteryPlatter.mm | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/KAIBatteryCell.mm b/KAIBatteryCell.mm index efa21a0..77d9208 100755 --- a/KAIBatteryCell.mm +++ b/KAIBatteryCell.mm @@ -135,7 +135,11 @@ } [self.heightAnchor constraintEqualToConstant:(bannerHeight + spacing)].active = YES; - [self.widthAnchor constraintEqualToConstant:(self.frame.size.width)].active = YES; + if(kaiAlign==0) { + [self.widthAnchor constraintEqualToConstant:(self.frame.size.width)].active = YES; + } else { + [self.widthAnchor constraintEqualToAnchor:blurPlatter.widthAnchor].active = YES; + } } diff --git a/KAIBatteryPlatter.mm b/KAIBatteryPlatter.mm index d51443a..d13ae25 100755 --- a/KAIBatteryPlatter.mm +++ b/KAIBatteryPlatter.mm @@ -119,9 +119,11 @@ long long lastPercentage; self.stack.heightConstraint.active = YES; } else { - int height = (self.number * (bannerHeight + spacing)); - if([self.superview.subviews count]>1) { + int height = (self.number * (bannerHeight + spacing)); + if(kaiAlign==0 && [self.superview.subviews count]>1) { height = (self.number * (bannerHeight + spacing)) - spacing; + } else { + height = bannerHeight; } self.heightConstraint.constant = height; self.stack.heightConstraint.constant = height;