From c998d8c0317ebc4bd972d54b732b1dc6e7d20e76 Mon Sep 17 00:00:00 2001 From: Lessica Date: Fri, 26 Jan 2024 14:02:19 +0800 Subject: [PATCH] appearance: small adjusts Signed-off-by: Lessica --- .../xcschemes/TrollSpeed-Sandbox.xcscheme | 1 + layout/Applications/TrollSpeed.app/Info.plist | 4 +-- .../en.lproj/Localizable.strings | 18 ++++++------ .../es.lproj/Localizable.strings | 18 ++++++------ .../zh-Hans.lproj/Localizable.strings | 18 ++++++------ layout/DEBIAN/control | 2 +- sources/HUDBackdropLabel.mm | 7 +++-- sources/TSSettingsIndex.swift | 28 +++++++++---------- supports/Sandbox-Info.plist | 4 +-- 9 files changed, 51 insertions(+), 49 deletions(-) diff --git a/TrollSpeed.xcodeproj/xcshareddata/xcschemes/TrollSpeed-Sandbox.xcscheme b/TrollSpeed.xcodeproj/xcshareddata/xcschemes/TrollSpeed-Sandbox.xcscheme index 578d70f..7c782e9 100644 --- a/TrollSpeed.xcodeproj/xcshareddata/xcschemes/TrollSpeed-Sandbox.xcscheme +++ b/TrollSpeed.xcodeproj/xcshareddata/xcschemes/TrollSpeed-Sandbox.xcscheme @@ -33,6 +33,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "es" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/layout/Applications/TrollSpeed.app/Info.plist b/layout/Applications/TrollSpeed.app/Info.plist index 866bac1..d7c809a 100644 --- a/layout/Applications/TrollSpeed.app/Info.plist +++ b/layout/Applications/TrollSpeed.app/Info.plist @@ -21,7 +21,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.10.1 + 1.10.2 CFBundleSignature ???? CFBundleURLTypes @@ -36,7 +36,7 @@ CFBundleVersion - 1.10.1 + 1.10.2 LSApplicationCategoryType public.app-category.developer-tools NSHumanReadableCopyright diff --git a/layout/Applications/TrollSpeed.app/en.lproj/Localizable.strings b/layout/Applications/TrollSpeed.app/en.lproj/Localizable.strings index 74e2050..6265de7 100644 --- a/layout/Applications/TrollSpeed.app/en.lproj/Localizable.strings +++ b/layout/Applications/TrollSpeed.app/en.lproj/Localizable.strings @@ -46,6 +46,9 @@ /* formattedSpeed */ "0 KB/s" = "0 KB/s"; +/* No comment provided by engineer. */ +"Appearance" = "Appearance"; + /* No comment provided by engineer. */ "b/s" = "b/s"; @@ -55,6 +58,9 @@ /* No comment provided by engineer. */ "Choose an action below." = "Choose an action below."; +/* No comment provided by engineer. */ +"Classic" = "Classic"; + /* No comment provided by engineer. */ "Developer Area" = "Developer Area"; @@ -76,6 +82,9 @@ /* No comment provided by engineer. */ "Incoming Only" = "Incoming Only"; +/* No comment provided by engineer. */ +"Inverted" = "Inverted"; + /* No comment provided by engineer. */ "Keep In-place" = "Keep In-place"; @@ -135,12 +144,3 @@ /* No comment provided by engineer. */ "▲▼" = "▲▼"; - -/* No comment provided by engineer. */ -"Classic" = "Classic"; - -/* No comment provided by engineer. */ -"Inverted" = "Inverted"; - -/* No comment provided by engineer. */ -"Appearance" = "Appearance"; diff --git a/layout/Applications/TrollSpeed.app/es.lproj/Localizable.strings b/layout/Applications/TrollSpeed.app/es.lproj/Localizable.strings index 6bf5757..f7fd9ef 100644 --- a/layout/Applications/TrollSpeed.app/es.lproj/Localizable.strings +++ b/layout/Applications/TrollSpeed.app/es.lproj/Localizable.strings @@ -46,6 +46,9 @@ /* formattedSpeed */ "0 KB/s" = "0 KB/s"; +/* No comment provided by engineer. */ +"Appearance" = "Apariencia"; + /* No comment provided by engineer. */ "b/s" = "b/s"; @@ -55,6 +58,9 @@ /* No comment provided by engineer. */ "Choose an action below." = "Elija una acción a continuación."; +/* No comment provided by engineer. */ +"Classic" = "Clásico"; + /* No comment provided by engineer. */ "Developer Area" = "Área de desarrollo"; @@ -76,6 +82,9 @@ /* No comment provided by engineer. */ "Incoming Only" = "Sólo descarga"; +/* No comment provided by engineer. */ +"Inverted" = "Invertido"; + /* No comment provided by engineer. */ "Keep In-place" = "Mantener en el sitio"; @@ -135,12 +144,3 @@ /* No comment provided by engineer. */ "▲▼" = "▲▼"; - -/* No comment provided by engineer. */ -"Classic" = "Clásico"; - -/* No comment provided by engineer. */ -"Inverted" = "Invertido"; - -/* No comment provided by engineer. */ -"Appearance" = "Apariencia"; diff --git a/layout/Applications/TrollSpeed.app/zh-Hans.lproj/Localizable.strings b/layout/Applications/TrollSpeed.app/zh-Hans.lproj/Localizable.strings index 5af716c..f8a9f3d 100644 --- a/layout/Applications/TrollSpeed.app/zh-Hans.lproj/Localizable.strings +++ b/layout/Applications/TrollSpeed.app/zh-Hans.lproj/Localizable.strings @@ -46,6 +46,9 @@ /* formattedSpeed */ "0 KB/s" = "0 KB/s"; +/* No comment provided by engineer. */ +"Appearance" = "外观"; + /* No comment provided by engineer. */ "b/s" = "b/s"; @@ -55,6 +58,9 @@ /* No comment provided by engineer. */ "Choose an action below." = "请选择以下任一选项。"; +/* No comment provided by engineer. */ +"Classic" = "经典"; + /* No comment provided by engineer. */ "Developer Area" = "开发者工具"; @@ -76,6 +82,9 @@ /* No comment provided by engineer. */ "Incoming Only" = "仅显示下载"; +/* No comment provided by engineer. */ +"Inverted" = "实时反色"; + /* No comment provided by engineer. */ "Keep In-place" = "锁定位置"; @@ -135,12 +144,3 @@ /* No comment provided by engineer. */ "▲▼" = "▲▼"; - -/* No comment provided by engineer. */ -"Classic" = "经典"; - -/* No comment provided by engineer. */ -"Inverted" = "实时反色"; - -/* No comment provided by engineer. */ -"Appearance" = "外观"; diff --git a/layout/DEBIAN/control b/layout/DEBIAN/control index 6b8f30e..3a1f30c 100644 --- a/layout/DEBIAN/control +++ b/layout/DEBIAN/control @@ -1,6 +1,6 @@ Package: ch.xxtou.hudapp Name: HUD App -Version: 1.10.1 +Version: 1.10.2 Section: Tweaks Depends: firmware (>= 14.0), mobilesubstrate (>= 0.9.7000) Architecture: iphoneos-arm diff --git a/sources/HUDBackdropLabel.mm b/sources/HUDBackdropLabel.mm index ebd43c3..c84ea61 100644 --- a/sources/HUDBackdropLabel.mm +++ b/sources/HUDBackdropLabel.mm @@ -41,6 +41,7 @@ - (void)setColorInvertEnabled:(BOOL)colorInvertEnabled - (void)setupAppearance { + self.alpha = 0.85; self.textColor = _isColorInvertEnabled ? [UIColor clearColor] : [UIColor whiteColor]; if (_isColorInvertEnabled) { @@ -54,10 +55,10 @@ - (void)setupAppearance [blurFilter setValue:@YES forKey:@"inputNormalizeEdges"]; // do not use inputHardEdges CAFilter *contrastFilter = [CAFilter filterWithName:kCAFilterColorContrast]; - [contrastFilter setValue:@(500.0) forKey:@"inputAmount"]; // 500x + [contrastFilter setValue:@(1000.0) forKey:@"inputAmount"]; // 1000x CAFilter *brightnessFilter = [CAFilter filterWithName:kCAFilterColorBrightness]; - [brightnessFilter setValue:@(-0.3) forKey:@"inputAmount"]; // -30% + [brightnessFilter setValue:@(-0.285) forKey:@"inputAmount"]; // -28.5% CAFilter *saturateFilter = [CAFilter filterWithName:kCAFilterColorSaturate]; [saturateFilter setValue:@(0.0) forKey:@"inputAmount"]; @@ -70,7 +71,7 @@ - (void)setupAppearance ]]; _backdropTextLayer = [CATextLayer layer]; - _backdropTextLayer.contentsScale = self.layer.contentsScale; + _backdropTextLayer.contentsScale = self.layer.contentsScale * 1.1; _backdropTextLayer.allowsFontSubpixelQuantization = YES; _backdropTextLayer.actions = @{ @"bounds": [NSNull null], diff --git a/sources/TSSettingsIndex.swift b/sources/TSSettingsIndex.swift index 47151fd..3f05f27 100644 --- a/sources/TSSettingsIndex.swift +++ b/sources/TSSettingsIndex.swift @@ -12,11 +12,11 @@ enum TSSettingsIndex: Int, CaseIterable { case keepInPlace case hideAtSnapshot case singleLineMode + case usesInvertedColor case usesRotation case usesLargeFont - case usesBitrate case usesArrowPrefixes - case usesInvertedColor + case usesBitrate var key: String { switch self { @@ -28,16 +28,16 @@ enum TSSettingsIndex: Int, CaseIterable { return HUDUserDefaultsKeyHideAtSnapshot case .singleLineMode: return HUDUserDefaultsKeySingleLineMode + case .usesInvertedColor: + return HUDUserDefaultsKeyUsesInvertedColor case .usesRotation: return HUDUserDefaultsKeyUsesRotation case .usesLargeFont: return HUDUserDefaultsKeyUsesLargeFont - case .usesBitrate: - return HUDUserDefaultsKeyUsesBitrate case .usesArrowPrefixes: return HUDUserDefaultsKeyUsesArrowPrefixes - case .usesInvertedColor: - return HUDUserDefaultsKeyUsesInvertedColor + case .usesBitrate: + return HUDUserDefaultsKeyUsesBitrate } } @@ -51,16 +51,16 @@ enum TSSettingsIndex: Int, CaseIterable { return NSLocalizedString("Hide @snapshot", comment: "TSSettingsIndex") case .singleLineMode: return NSLocalizedString("Incoming Only", comment: "TSSettingsIndex") + case .usesInvertedColor: + return NSLocalizedString("Appearance", comment: "TSSettingsIndex") case .usesRotation: return NSLocalizedString("Landscape", comment: "TSSettingsIndex") case .usesLargeFont: return NSLocalizedString("Size", comment: "TSSettingsIndex") - case .usesBitrate: - return NSLocalizedString("Unit", comment: "TSSettingsIndex") case .usesArrowPrefixes: return NSLocalizedString("Prefixes", comment: "TSSettingsIndex") - case .usesInvertedColor: - return NSLocalizedString("Appearance", comment: "TSSettingsIndex") + case .usesBitrate: + return NSLocalizedString("Unit", comment: "TSSettingsIndex") } } @@ -76,16 +76,16 @@ enum TSSettingsIndex: Int, CaseIterable { case .hideAtSnapshot: fallthrough case .singleLineMode: return highlighted ? NSLocalizedString("ON", comment: "TSSettingsIndex") : NSLocalizedString("OFF", comment: "TSSettingsIndex") + case .usesInvertedColor: + return highlighted ? NSLocalizedString("Inverted", comment: "TSSettingsIndex") : NSLocalizedString("Classic", comment: "TSSettingsIndex") case .usesRotation: return highlighted ? NSLocalizedString("Follow", comment: "TSSettingsIndex") : NSLocalizedString("Hide", comment: "TSSettingsIndex") case .usesLargeFont: return highlighted ? NSLocalizedString("Large", comment: "TSSettingsIndex") : NSLocalizedString("Standard", comment: "TSSettingsIndex") - case .usesBitrate: - return highlighted ? NSLocalizedString("b/s", comment: "TSSettingsIndex") : NSLocalizedString("B/s", comment: "TSSettingsIndex") case .usesArrowPrefixes: return highlighted ? NSLocalizedString("↑↓", comment: "TSSettingsIndex") : NSLocalizedString("▲▼", comment: "TSSettingsIndex") - case .usesInvertedColor: - return highlighted ? NSLocalizedString("Inverted", comment: "TSSettingsIndex") : NSLocalizedString("Classic", comment: "TSSettingsIndex") + case .usesBitrate: + return highlighted ? NSLocalizedString("b/s", comment: "TSSettingsIndex") : NSLocalizedString("B/s", comment: "TSSettingsIndex") } } } diff --git a/supports/Sandbox-Info.plist b/supports/Sandbox-Info.plist index eed56b4..ce59375 100644 --- a/supports/Sandbox-Info.plist +++ b/supports/Sandbox-Info.plist @@ -21,7 +21,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.10.1 + 1.10.2 CFBundleSignature ???? CFBundleURLTypes @@ -36,7 +36,7 @@ CFBundleVersion - 1.10.1 + 1.10.2 LSApplicationCategoryType public.app-category.developer-tools NSHumanReadableCopyright