|
103 | 103 | #define INLINE_SEPARATOR "\t" |
104 | 104 | #define IDLE_INTERVAL 3.0 |
105 | 105 |
|
| 106 | +static const double HUD_MIN_FONT_SIZE = 9.0; |
| 107 | +static const double HUD_MAX_FONT_SIZE = 10.0; |
| 108 | +static const double HUD_MIN_CORNER_RADIUS = 4.5; |
| 109 | +static const double HUD_MAX_CORNER_RADIUS = 5.0; |
106 | 110 | static double HUD_FONT_SIZE = 8.0; |
107 | 111 | static UIFontWeight HUD_FONT_WEIGHT = UIFontWeightRegular; |
108 | 112 | static CGFloat HUD_INACTIVE_OPACITY = 0.667; |
@@ -395,8 +399,8 @@ - (void)reloadUserDefaults |
395 | 399 | HUD_DOWNLOAD_PREFIX = (usesArrowPrefixes ? "↓" : "▼"); |
396 | 400 |
|
397 | 401 | BOOL usesLargeFont = [self usesLargeFont]; |
398 | | - HUD_FONT_SIZE = (usesLargeFont ? 9.0 : 8.0); |
399 | | - [_blurView.layer setCornerRadius:(usesLargeFont ? 4.5 : 4.0)]; |
| 402 | + HUD_FONT_SIZE = (usesLargeFont ? HUD_MAX_FONT_SIZE : HUD_MIN_FONT_SIZE); |
| 403 | + [_blurView.layer setCornerRadius:(usesLargeFont ? HUD_MAX_CORNER_RADIUS : HUD_MIN_CORNER_RADIUS)]; |
400 | 404 |
|
401 | 405 | BOOL usesInvertedColor = [self usesInvertedColor]; |
402 | 406 | HUD_FONT_WEIGHT = (usesInvertedColor ? UIFontWeightSemibold : UIFontWeightRegular); |
@@ -591,7 +595,7 @@ - (void)viewDidLoad |
591 | 595 |
|
592 | 596 | _blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; |
593 | 597 | _blurView = [[UIVisualEffectView alloc] initWithEffect:_blurEffect]; |
594 | | - _blurView.layer.cornerRadius = 4.0; |
| 598 | + _blurView.layer.cornerRadius = HUD_MIN_CORNER_RADIUS; |
595 | 599 | _blurView.layer.masksToBounds = YES; |
596 | 600 | _blurView.translatesAutoresizingMaskIntoConstraints = NO; |
597 | 601 | _containerView = [[ScreenshotInvisibleContainer alloc] initWithContent:_blurView]; |
@@ -744,8 +748,11 @@ - (void)updateViewConstraints |
744 | 748 | CGFloat minimumTopConstraintConstant = 0; |
745 | 749 | CGFloat minimumBottomConstraintConstant = 0; |
746 | 750 |
|
747 | | - if (CGRectGetMinY(layoutGuide.layoutFrame) > 30) { |
748 | | - minimumTopConstraintConstant = -10; |
| 751 | + if (CGRectGetMinY(layoutGuide.layoutFrame) >= 51) { |
| 752 | + minimumTopConstraintConstant = -8; |
| 753 | + } |
| 754 | + else if (CGRectGetMinY(layoutGuide.layoutFrame) > 30) { |
| 755 | + minimumTopConstraintConstant = -12; |
749 | 756 | minimumBottomConstraintConstant = -4; |
750 | 757 | } else { |
751 | 758 | #if !NO_TROLL |
|
0 commit comments