From d73c0ee319e29234fc5f9b4216c88e6471890b1d Mon Sep 17 00:00:00 2001 From: TrueZhuanjia Date: Tue, 12 Aug 2025 13:26:42 +0800 Subject: [PATCH] iOS12 compatibility: on-screen widget layout Tool --- VoidLink/Localization/Localizable.xcstrings | 69 +++++++++++++++++++ .../LayoutOnScreenControlsViewController.m | 5 +- 2 files changed, 73 insertions(+), 1 deletion(-) diff --git a/VoidLink/Localization/Localizable.xcstrings b/VoidLink/Localization/Localizable.xcstrings index a1275f2c..87f5a3c3 100644 --- a/VoidLink/Localization/Localizable.xcstrings +++ b/VoidLink/Localization/Localizable.xcstrings @@ -1290,6 +1290,29 @@ } } }, + "Del" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "刪除" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "刪除" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "刪除" + } + } + } + }, "Delete" : { "extractionState" : "manual", "localizations" : { @@ -2448,6 +2471,29 @@ } } }, + "Load" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "加载" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "加載" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "加載" + } + } + } + }, "Local Keyboard Toggle Disabled" : { "extractionState" : "manual", "localizations" : { @@ -4903,6 +4949,29 @@ } } }, + "Undo" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "回撤" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "回撤" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "回撤" + } + } + } + }, "unlockDisplayOrientationStackTip" : { "extractionState" : "manual", "localizations" : { diff --git a/VoidLink/ViewControllers/CustomOSCViewControl/LayoutOnScreenControlsViewController.m b/VoidLink/ViewControllers/CustomOSCViewControl/LayoutOnScreenControlsViewController.m index c5761881..4221d353 100644 --- a/VoidLink/ViewControllers/CustomOSCViewControl/LayoutOnScreenControlsViewController.m +++ b/VoidLink/ViewControllers/CustomOSCViewControl/LayoutOnScreenControlsViewController.m @@ -978,9 +978,11 @@ UIButton *button = (UIButton *)subview; button.imageView.image = [button.imageView.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; button.tintColor = [UIColor systemTealColor]; - if(!button.imageView.image){ + if(@available(iOS 13.0, *)) nil; + else{ NSLog(@"missing image %d", button==_saveButton); button.titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium]; + [button setImage:nil forState:UIControlStateNormal]; if(button==_exitButton) [button setTitle:[LocalizationHelper localizedStringForKey:@"Exit"] forState:UIControlStateNormal]; if(button==trashCanButton) [button setTitle:[LocalizationHelper localizedStringForKey:@"Del"] forState:UIControlStateNormal]; if(button==undoButton) [button setTitle:[LocalizationHelper localizedStringForKey:@"Undo"] forState:UIControlStateNormal]; @@ -988,6 +990,7 @@ if(button==_loadButton) [button setTitle:[LocalizationHelper localizedStringForKey:@"Load"] forState:UIControlStateNormal]; if(button==_addButton) [button setTitle:[LocalizationHelper localizedStringForKey:@"Add"] forState:UIControlStateNormal]; if(button==_editButton) [button setTitle:[LocalizationHelper localizedStringForKey:@"Edit"] forState:UIControlStateNormal]; + } } [self handleMissingToolBarIcon:subview];