Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit f591649

Browse files
committed
feat: adjust font size
Signed-off-by: 82Flex <82flex@gmail.com>
1 parent 35f47b1 commit f591649

File tree

6 files changed

+21
-15
lines changed

6 files changed

+21
-15
lines changed

layout/Applications/TrollSpeed.app/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<key>CFBundlePackageType</key>
2222
<string>APPL</string>
2323
<key>CFBundleShortVersionString</key>
24-
<string>1.11.0</string>
24+
<string>1.11.1</string>
2525
<key>CFBundleSignature</key>
2626
<string>????</string>
2727
<key>CFBundleURLTypes</key>
@@ -36,7 +36,7 @@
3636
</dict>
3737
</array>
3838
<key>CFBundleVersion</key>
39-
<string>1.11.0</string>
39+
<string>1.11.1</string>
4040
<key>LSApplicationCategoryType</key>
4141
<string>public.app-category.developer-tools</string>
4242
<key>NSHumanReadableCopyright</key>

layout/DEBIAN/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: ch.xxtou.hudapp
22
Name: HUD App
3-
Version: 1.11.0
3+
Version: 1.11.1
44
Section: Tweaks
55
Depends: firmware (>= 14.0), mobilesubstrate (>= 0.9.7000)
66
Architecture: iphoneos-arm

sources/HUDBackdropLabel.mm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ - (void)setupAppearance
7171
]];
7272

7373
_backdropTextLayer = [CATextLayer layer];
74-
_backdropTextLayer.contentsScale = self.layer.contentsScale * 1.1;
75-
_backdropTextLayer.allowsFontSubpixelQuantization = YES;
74+
_backdropTextLayer.contentsScale = self.layer.contentsScale * 1.2;
7675
_backdropTextLayer.actions = @{
7776
@"bounds": [NSNull null],
7877
@"contents": [NSNull null],

sources/HUDRootViewController.mm

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@
103103
#define INLINE_SEPARATOR "\t"
104104
#define IDLE_INTERVAL 3.0
105105

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;
106110
static double HUD_FONT_SIZE = 8.0;
107111
static UIFontWeight HUD_FONT_WEIGHT = UIFontWeightRegular;
108112
static CGFloat HUD_INACTIVE_OPACITY = 0.667;
@@ -395,8 +399,8 @@ - (void)reloadUserDefaults
395399
HUD_DOWNLOAD_PREFIX = (usesArrowPrefixes ? "" : "");
396400

397401
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)];
400404

401405
BOOL usesInvertedColor = [self usesInvertedColor];
402406
HUD_FONT_WEIGHT = (usesInvertedColor ? UIFontWeightSemibold : UIFontWeightRegular);
@@ -591,7 +595,7 @@ - (void)viewDidLoad
591595

592596
_blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
593597
_blurView = [[UIVisualEffectView alloc] initWithEffect:_blurEffect];
594-
_blurView.layer.cornerRadius = 4.0;
598+
_blurView.layer.cornerRadius = HUD_MIN_CORNER_RADIUS;
595599
_blurView.layer.masksToBounds = YES;
596600
_blurView.translatesAutoresizingMaskIntoConstraints = NO;
597601
_containerView = [[ScreenshotInvisibleContainer alloc] initWithContent:_blurView];
@@ -744,8 +748,11 @@ - (void)updateViewConstraints
744748
CGFloat minimumTopConstraintConstant = 0;
745749
CGFloat minimumBottomConstraintConstant = 0;
746750

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;
749756
minimumBottomConstraintConstant = -4;
750757
} else {
751758
#if !NO_TROLL

sources/RootViewController.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
#define HUD_TRANSITION_DURATION 0.25
1919

2020
static BOOL _gShouldToggleHUDAfterLaunch = NO;
21-
static const CGFloat _gTopButtonConstraintsConstantCompact = 40.f;
21+
static const CGFloat _gTopButtonConstraintsConstantCompact = 46.f;
2222
static const CGFloat _gTopButtonConstraintsConstantRegular = 28.f;
23-
static const CGFloat _gTopButtonConstraintsConstantRegularPad = 40.f;
23+
static const CGFloat _gTopButtonConstraintsConstantRegularPad = 46.f;
2424
static const CGFloat _gAuthorLabelBottomConstraintConstantCompact = -20.f;
2525
static const CGFloat _gAuthorLabelBottomConstraintConstantRegular = -80.f;
2626

@@ -241,7 +241,7 @@ - (void)loadView
241241

242242
- (void)viewDidLayoutSubviews {
243243
[super viewDidLayoutSubviews];
244-
_supportsCenterMost = self.view.window.safeAreaLayoutGuide.layoutFrame.origin.y >= 51;
244+
_supportsCenterMost = CGRectGetMinY(self.view.window.safeAreaLayoutGuide.layoutFrame) >= 51;
245245
}
246246

247247
- (void)viewDidLoad {

supports/Sandbox-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<key>CFBundlePackageType</key>
2222
<string>APPL</string>
2323
<key>CFBundleShortVersionString</key>
24-
<string>1.11.0</string>
24+
<string>1.11.1</string>
2525
<key>CFBundleSignature</key>
2626
<string>????</string>
2727
<key>CFBundleURLTypes</key>
@@ -36,7 +36,7 @@
3636
</dict>
3737
</array>
3838
<key>CFBundleVersion</key>
39-
<string>1.11.0</string>
39+
<string>1.11.1</string>
4040
<key>LSApplicationCategoryType</key>
4141
<string>public.app-category.developer-tools</string>
4242
<key>NSHumanReadableCopyright</key>

0 commit comments

Comments
 (0)