From 00491d3bcef87cb8e3b81df5ced0150cd1fe2329 Mon Sep 17 00:00:00 2001 From: TrueZhuanjia Date: Thu, 17 Jul 2025 22:08:13 +0800 Subject: [PATCH] tweak hostSpinner --- VoidLink/HostCardView.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/VoidLink/HostCardView.m b/VoidLink/HostCardView.m index 497b85ea..cfe45f99 100644 --- a/VoidLink/HostCardView.m +++ b/VoidLink/HostCardView.m @@ -50,13 +50,16 @@ static const float REFRESH_CYCLE = 2.0f; +- (BOOL)isIPhone{ + return ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone); +} - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { buttonLabelFontSize = 15*_sizeFactor; longPressFired = false; - computerIconMonitorCenterYOffset = -4.3523*_sizeFactor; + computerIconMonitorCenterYOffset = [self isIPhone] ? -3.62*_sizeFactor : -4.175*_sizeFactor; iconAndButtonSpacing = 37*_sizeFactor; buttonHeight = 39*_sizeFactor; defaultBlue = [ThemeManager appPrimaryColor]; @@ -94,6 +97,8 @@ static const float REFRESH_CYCLE = 2.0f; } + + - (instancetype)initWithCoder:(NSCoder *)coder { self = [super initWithCoder:coder]; if (self) {