diff --git a/VoidLink.xcodeproj/project.pbxproj b/VoidLink.xcodeproj/project.pbxproj index 1241e7ac..b6caa31c 100644 --- a/VoidLink.xcodeproj/project.pbxproj +++ b/VoidLink.xcodeproj/project.pbxproj @@ -1327,7 +1327,7 @@ INFOPLIST_FILE = "VoidLink/Limelight-Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "VoidLink - beta"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/VoidLink/AppDelegate.h b/VoidLink/AppDelegate.h index 4604f3bf..779b275d 100644 --- a/VoidLink/AppDelegate.h +++ b/VoidLink/AppDelegate.h @@ -10,6 +10,7 @@ @interface AppDelegate : UIResponder +@property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) NSString *pcUuidToLoad; @property (strong, nonatomic) void (^shortcutCompletionHandler)(BOOL); diff --git a/VoidLink/AppDelegate.m b/VoidLink/AppDelegate.m index ec15c9b8..bc9712b2 100644 --- a/VoidLink/AppDelegate.m +++ b/VoidLink/AppDelegate.m @@ -60,6 +60,27 @@ static NSString* DB_NAME = @"Limelight_iOS.sqlite"; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for command tool customization after application launch (works only when user default is nil) [CommandManager presetDefaultCommands]; + + // For iOS 12 and below, we need to manually create the window + if (@available(iOS 13.0, *)) { + // Scene delegate will handle window creation + } else { + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + + NSString *storyboardName; + if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad) { + storyboardName = @"iPad"; + } else { + storyboardName = @"iPhone"; + } + + UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle:nil]; + UIViewController *initialViewController = [storyboard instantiateInitialViewController]; + + self.window.rootViewController = initialViewController; + [self.window makeKeyAndVisible]; + } + return YES; } diff --git a/VoidLink/Base.lproj/iPad.storyboard b/VoidLink/Base.lproj/iPad.storyboard index 34ab2025..4bc7d608 100644 --- a/VoidLink/Base.lproj/iPad.storyboard +++ b/VoidLink/Base.lproj/iPad.storyboard @@ -1681,11 +1681,11 @@ - + - - + + @@ -1726,13 +1726,13 @@ - - - - - - - + + + + + + + @@ -1761,7 +1761,7 @@ - + @@ -1770,13 +1770,13 @@ - + - + - + diff --git a/VoidLink/Base.lproj/iPhone.storyboard b/VoidLink/Base.lproj/iPhone.storyboard index 3b992598..12159717 100644 --- a/VoidLink/Base.lproj/iPhone.storyboard +++ b/VoidLink/Base.lproj/iPhone.storyboard @@ -677,12 +677,12 @@ - + - - + + @@ -728,8 +728,8 @@ - - + + @@ -889,6 +889,29 @@ + + + + + + + + + + + + + + + + + + diff --git a/VoidLink/Images.xcassets/play.circle.fill.imageset/play.circle.fill.svg b/VoidLink/Images.xcassets/play.circle.fill.imageset/play.circle.fill.svg index c5320593..2d77d137 100644 --- a/VoidLink/Images.xcassets/play.circle.fill.imageset/play.circle.fill.svg +++ b/VoidLink/Images.xcassets/play.circle.fill.imageset/play.circle.fill.svg @@ -3,9 +3,9 @@ - + - - + + diff --git a/VoidLink/Input/CommandManager.swift b/VoidLink/Input/CommandManager.swift index 2266a801..8d113f1a 100644 --- a/VoidLink/Input/CommandManager.swift +++ b/VoidLink/Input/CommandManager.swift @@ -90,7 +90,12 @@ import UIKit "OSCDOWN" : DOWN_FLAG, "OSCLEFT" : LEFT_FLAG, "OSCRIGHT" : RIGHT_FLAG, - "DS4TOUCH" : TOUCHPAD_FLAG, + "DS4TCHBTN" : TOUCHPAD_FLAG, + "PADDLE1" : PADDLE1_FLAG, + "PADDLE2" : PADDLE2_FLAG, + "PADDLE3" : PADDLE3_FLAG, + "PADDLE4" : PADDLE4_FLAG, + "MISC" : MISC_FLAG, "OSCL2" : 0, "L2" : 0, "LT" : 0, diff --git a/VoidLink/Input/OnScreenWidgetView.swift b/VoidLink/Input/OnScreenWidgetView.swift index d802b1f3..852cfe41 100644 --- a/VoidLink/Input/OnScreenWidgetView.swift +++ b/VoidLink/Input/OnScreenWidgetView.swift @@ -194,7 +194,7 @@ import UIKit case "RSPAD", "RSVPAD": self.comboButtonStrings = ["OSCR3"] case "DS4TOUCH": - self.comboButtonStrings = ["DS4TOUCH"] + self.comboButtonStrings = ["DS4TCHBTN"] default: break } } diff --git a/VoidLink/Limelight.xcdatamodeld/VoidLink v1.0.xcdatamodel/contents b/VoidLink/Limelight.xcdatamodeld/VoidLink v1.0.xcdatamodel/contents index b7377141..b582424a 100644 --- a/VoidLink/Limelight.xcdatamodeld/VoidLink v1.0.xcdatamodel/contents +++ b/VoidLink/Limelight.xcdatamodeld/VoidLink v1.0.xcdatamodel/contents @@ -50,7 +50,7 @@ - + diff --git a/VoidLink/Localization/Localizable.xcstrings b/VoidLink/Localization/Localizable.xcstrings index e373e237..fc6806ad 100644 --- a/VoidLink/Localization/Localizable.xcstrings +++ b/VoidLink/Localization/Localizable.xcstrings @@ -516,27 +516,21 @@ "Add Host" : { "extractionState" : "manual", "localizations" : { - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "添加主机" - } - }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "添加主机" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "新增主機" } }, "zh-HK" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "新增主機" } } @@ -1313,6 +1307,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" : { @@ -2471,6 +2488,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" : { @@ -4955,6 +4995,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/SceneDelegate.h b/VoidLink/SceneDelegate.h index 3a908f88..6763caa0 100644 --- a/VoidLink/SceneDelegate.h +++ b/VoidLink/SceneDelegate.h @@ -1,5 +1,6 @@ #import +API_AVAILABLE(ios(13.0)) @interface SceneDelegate : UIResponder @property (strong, nonatomic) UIWindow * window; diff --git a/VoidLink/SceneDelegate.m b/VoidLink/SceneDelegate.m index 58344cfd..275aaedc 100644 --- a/VoidLink/SceneDelegate.m +++ b/VoidLink/SceneDelegate.m @@ -1,6 +1,7 @@ #import "SceneDelegate.h" #import "StreamFrameViewController.h" +API_AVAILABLE(ios(13.0)) @implementation SceneDelegate static UIView *_sharedStreamVideoRenderView = nil; diff --git a/VoidLink/UIAppView.m b/VoidLink/UIAppView.m index 54d9793b..b69b34f8 100644 --- a/VoidLink/UIAppView.m +++ b/VoidLink/UIAppView.m @@ -183,8 +183,10 @@ static UIImage* noImage; _appOverlay = playIcon; } else { - _appOverlay = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Play"]]; - + UIImageView* playIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"play.circle.fill"]]; + playIcon.tintColor = [[UIColor blackColor] colorWithAlphaComponent:0.55]; + _appOverlay = playIcon; + } diff --git a/VoidLink/ViewControllers/CustomOSCViewControl/LayoutOnScreenControlsViewController.m b/VoidLink/ViewControllers/CustomOSCViewControl/LayoutOnScreenControlsViewController.m index c5761881..1fdeb0e5 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]; @@ -1221,6 +1224,8 @@ _oscProfilesTableViewController.currentOSCButtonLayers = self.layoutOSC.OSCButtonLayers; + // _oscProfilesTableViewController.modalPresentationStyle = UIModalPresentationCurrentContext; + _oscProfilesTableViewController.modalPresentationStyle = UIModalPresentationOverCurrentContext; [self presentViewController:_oscProfilesTableViewController animated:YES completion:nil]; } @@ -1236,7 +1241,8 @@ OnScreenWidgetView* widget = (OnScreenWidgetView* )sender; [self.layoutOSC updateGuidelinesForOnScreenWidget:widget]; [self.view bringSubviewToFront:widget]; - trashCanButton.tintColor = [self layerIsOverlappingWithTrashcanButton:widget.layer] ? [UIColor redColor] : trashCanStoryBoardColor; + trashCanButton.tintColor = trashCanButton.titleLabel.textColor = [self layerIsOverlappingWithTrashcanButton:widget.layer] ? [UIColor redColor] : trashCanStoryBoardColor; + self.undoButton.alpha = 1.0; } @@ -1287,10 +1293,8 @@ // -------- for OSC buttons [self.layoutOSC touchesMoved:touches withEvent:event]; - if ([self layerIsOverlappingWithTrashcanButton:self.layoutOSC.layerBeingDragged]) { // check if user is dragging around a button and hovering it over the trash can button - trashCanButton.tintColor = [UIColor redColor]; - } - else trashCanButton.tintColor = trashCanStoryBoardColor; + + trashCanButton.tintColor = trashCanButton.titleLabel.textColor = [self layerIsOverlappingWithTrashcanButton:self.layoutOSC.layerBeingDragged] ? [UIColor redColor] : trashCanStoryBoardColor; } - (bool)touchWithinTashcanButton:(UITouch* )touch { @@ -1364,7 +1368,7 @@ } - trashCanButton.tintColor = trashCanStoryBoardColor; + trashCanButton.tintColor = trashCanButton.titleLabel.textColor = trashCanStoryBoardColor; widgetPanelMovedByTouch = false; } diff --git a/VoidLink/ViewControllers/CustomOSCViewControl/OSCProfilesTableViewController.m b/VoidLink/ViewControllers/CustomOSCViewControl/OSCProfilesTableViewController.m index 06546075..ddbaa1af 100644 --- a/VoidLink/ViewControllers/CustomOSCViewControl/OSCProfilesTableViewController.m +++ b/VoidLink/ViewControllers/CustomOSCViewControl/OSCProfilesTableViewController.m @@ -85,7 +85,7 @@ const double NAV_BAR_HEIGHT = 50; forCellReuseIdentifier:@"Cell"]; // Register the custom cell nib file with the table view self.tableView.alpha = 0.7; //self.tableView.backgroundColor = [[UIColor colorWithRed:0.5 green:0.7 blue:1.0 alpha:1.0] colorWithAlphaComponent:0.2]; // set background color & transparency - self.tableView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1]; // set background color & transparency + self.tableView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5]; // set background color & transparency // self.tableView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.2]; // set background color & transparency } diff --git a/VoidLink/ViewControllers/MainFrameViewController.m b/VoidLink/ViewControllers/MainFrameViewController.m index 5d9b7074..6eef574b 100644 --- a/VoidLink/ViewControllers/MainFrameViewController.m +++ b/VoidLink/ViewControllers/MainFrameViewController.m @@ -1210,7 +1210,7 @@ static NSMutableSet* hostList; - (void)waterMarkTapped { // Handle the tap action here, e.g., open a URL - NSURL *url = [NSURL URLWithString:@"https://www.wolai.com/k8RVqMrgYgC9NB4tXdz46H"]; + NSURL *url = [NSURL URLWithString:[LocalizationHelper localizedStringForKey:@"supportLink"]]; if ([[UIApplication sharedApplication] canOpenURL:url]) { [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; } @@ -1230,7 +1230,8 @@ static NSMutableSet* hostList; - (void)attachWaterMark { // Create and configure the label - if(false){ + if (@available(iOS 13.0, *)) return; + else { [self->waterMark removeFromSuperview]; self->waterMark = [[UILabel alloc] init]; self->waterMark.translatesAutoresizingMaskIntoConstraints = NO; @@ -1239,18 +1240,8 @@ static NSMutableSet* hostList; self->waterMark.text = [LocalizationHelper localizedStringForKey:@"waterMarkText"]; CGFloat labelHeight = 60; // the app is unable to automatically lock screen orientation in app window resizable mode(aka. not require fullscreen) - - // if(![self isFullScreenRequired]){ - if(false){ - NSString* screenRotationTip = [LocalizationHelper localizedStringForKey:@"screenRotationTIp"]; - self->waterMark.text = [NSString stringWithFormat:@"%@\n%@", self->waterMark.text, screenRotationTip]; - self->waterMark.numberOfLines = 0; // Allow multiline text - self->waterMark.font = [UIFont systemFontOfSize:19]; - labelHeight = 80; - } - - self->waterMark.textColor = UIColor.blackColor; - self->waterMark.alpha = 0.35; + self->waterMark.textColor = UIColor.whiteColor; + self->waterMark.alpha = 0.2; self->waterMark.textAlignment = NSTextAlignmentCenter; self->waterMark.backgroundColor = [UIColor clearColor]; self->waterMark.userInteractionEnabled = YES; // Enable user interaction for tap gesture diff --git a/VoidLink/ViewControllers/SWRevealViewController.m b/VoidLink/ViewControllers/SWRevealViewController.m index eb08e380..7fd9b381 100755 --- a/VoidLink/ViewControllers/SWRevealViewController.m +++ b/VoidLink/ViewControllers/SWRevealViewController.m @@ -940,14 +940,15 @@ const int FrontViewPositionNone = 0xff; _dockedNavBar.standardAppearance = navBarAppearanceStandard; _dockedNavBar.scrollEdgeAppearance = navBarAppearanceStandard; } else { - _dockedNavBar.backgroundColor = [UIColor clearColor]; - _dockedNavBar.backgroundColor = [ThemeManager appBackgroundColor]; + _dockedNavBar.barTintColor = [UIColor clearColor]; + _dockedNavBar.barTintColor = [ThemeManager appBackgroundColor]; _dockedNavBar.shadowImage = [UIImage new]; // remove bottom line for navbar } // 创建导航项 - _navItem = [[UINavigationItem alloc] initWithTitle:[LocalizationHelper localizedStringForKey:@"Settings"]]; + if (@available(iOS 13.0, *)) _navItem = [[UINavigationItem alloc] initWithTitle:[LocalizationHelper localizedStringForKey:@"Settings"]]; + else _navItem = [[UINavigationItem alloc] initWithTitle:@""]; [self setupBackButton]; diff --git a/VoidLink/ViewControllers/SettingsViewController.m b/VoidLink/ViewControllers/SettingsViewController.m index 1f6aece5..e0227033 100644 --- a/VoidLink/ViewControllers/SettingsViewController.m +++ b/VoidLink/ViewControllers/SettingsViewController.m @@ -578,7 +578,9 @@ BOOL isCustomResolution(int resolutionSelected) { if (@available(iOS 13.0, *)) { [peripheralSection setSectionWithIcon:[UIImage imageNamed:@"cable.connector.video"] andSize:20]; } - [self addSetting:self.externalDisplayModeStack ofId:@"externalDisplayModeStack" withInfoTag:YES withDynamicLabel:NO to:peripheralSection]; + if (@available(iOS 13.0, *)) { + [self addSetting:self.externalDisplayModeStack ofId:@"externalDisplayModeStack" withInfoTag:YES withDynamicLabel:NO to:peripheralSection]; + } [self addSetting:self.localMousePointerModeStack ofId:@"localMousePointerModeStack" withInfoTag:YES withDynamicLabel:NO to:peripheralSection]; [self addSetting:self.reverseMouseWheelDirectionStack ofId:@"reverseMouseWheelDirectionStack" withInfoTag:NO withDynamicLabel:NO to:peripheralSection]; [self addSetting:self.citrixX1MouseStack ofId:@"citrixX1MouseStack" withInfoTag:NO withDynamicLabel:NO to:peripheralSection]; @@ -947,6 +949,7 @@ BOOL isCustomResolution(int resolutionSelected) { } else { [button setTitle:@"info" forState:UIControlStateNormal]; button.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightBold]; + button.titleLabel.accessibilityIdentifier = @"infoButton"; } button.accessibilityIdentifier = @"infoButton"; button.translatesAutoresizingMaskIntoConstraints = NO; @@ -1299,14 +1302,17 @@ BOOL isCustomResolution(int resolutionSelected) { _graphOpacity = [currentSettings.graphOpacity intValue]; // Get the size of the screen with and without safe area insets - UIWindow *window = UIApplication.sharedApplication.windows.firstObject; - CGFloat screenScale = window.screen.scale; - CGFloat safeAreaWidth = (window.frame.size.width - window.safeAreaInsets.left - window.safeAreaInsets.right) * screenScale; - CGFloat fullScreenWidth = window.frame.size.width * screenScale; - CGFloat fullScreenHeight = window.frame.size.height * screenScale; + // UIWindow *window = UIApplication.sharedApplication.windows.firstObject; + // CGFloat screenScale = window.screen.scale; + // CGFloat safeAreaWidth = (window.frame.size.width - window.safeAreaInsets.left - window.safeAreaInsets.right) * screenScale; + // CGFloat fullScreenWidth = window.frame.size.width * screenScale; + // CGFloat fullScreenHeight = window.frame.size.height * screenScale; [self.resolutionSelector removeSegmentAtIndex:0 animated:NO]; // remove 360p [self.resolutionSelector removeSegmentAtIndex:5 animated:NO]; // remove custom segment + // iOS12 compatibility: + self.resolutionSelector.selectedSegmentIndex = 3; + [self.resolutionSelector setNeedsLayout]; resolutionTable[5] = CGSizeMake([currentSettings.width integerValue], [currentSettings.height integerValue]); // custom initial value [self updateResolutionTable]; @@ -1354,7 +1360,7 @@ BOOL isCustomResolution(int resolutionSelected) { // Only enable the 4K option for "recent" devices. We'll judge that by whether // they support HEVC decoding (A9 or later). - [self.resolutionSelector setEnabled:NO forSegmentAtIndex:3]; + [self.resolutionSelector setEnabled:NO forSegmentAtIndex:2]; } switch (currentSettings.preferredCodec) { case CODEC_PREF_AUTO: @@ -1413,6 +1419,8 @@ BOOL isCustomResolution(int resolutionSelected) { [self.gyroModeSelector setEnabled:false forSegmentAtIndex:1]; [self.gyroModeSelector setEnabled:false forSegmentAtIndex:3]; } + CMMotionManager *motionManager = [[CMMotionManager alloc] init]; + [self.gyroModeSelector setEnabled:[motionManager isGyroAvailable] forSegmentAtIndex:2]; [self.emulatedControllerTypeSelector setSelectedSegmentIndex:[self controllerTypeToSegmentIndex:currentSettings.emulatedControllerType.intValue]]; [self.emulatedControllerTypeSelector addTarget:self action:@selector(emulatedControllerTypeChanged:) forControlEvents:(UIControlEventValueChanged)]; // Update label display when slider is being moved. @@ -2102,7 +2110,16 @@ BOOL isCustomResolution(int resolutionSelected) { label.layer.filters = nil; label.textColor = [ThemeManager textColor]; } else { - // Fallback on earlier versions + UIView *view = label; + bool isPartOfSelector = false; + while (view) { + if ([view isKindOfClass:[UISegmentedControl class]]) { + isPartOfSelector = true; + break; + } + view = view.superview; + } + if(!isPartOfSelector) label.textColor = [UIColor whiteColor]; } } [self updateThemeForLabels:subview]; @@ -2116,7 +2133,7 @@ BOOL isCustomResolution(int resolutionSelected) { if (@available(iOS 13.0, *)) { selector.selectedSegmentTintColor = [ThemeManager appSecondaryColor]; } else { - // Fallback on earlier versions + selector.tintColor = [ThemeManager appSecondaryColor]; } } [self updateThemeForSelectors:subview]; @@ -2137,11 +2154,9 @@ BOOL isCustomResolution(int resolutionSelected) { - (void)updateTheme{ self.view.backgroundColor = [ThemeManager appBackgroundColor]; - if (@available(iOS 13.0, *)) { - [self updateThemeForLabels:self.view]; - [self updateThemeForSelectors:self.view]; - [self updateThemeForSliders:self.view]; - } + [self updateThemeForLabels:self.view]; + [self updateThemeForSelectors:self.view]; + [self updateThemeForSliders:self.view]; } - (void) frameQueueSizeSliderMoved { diff --git a/VoidLink/ViewControllers/StreamFrameViewController.m b/VoidLink/ViewControllers/StreamFrameViewController.m index 09d5c2e8..bbe9f104 100644 --- a/VoidLink/ViewControllers/StreamFrameViewController.m +++ b/VoidLink/ViewControllers/StreamFrameViewController.m @@ -270,6 +270,7 @@ toolBoxViewController = [[ToolboxViewController alloc] init]; toolBoxViewController.specialEntryDelegate = self; toolBoxViewController.specialEntries = oldToolboxVC.specialEntries; + toolBoxViewController.modalPresentationStyle = UIModalPresentationOverCurrentContext; [self presentViewController:toolBoxViewController animated:YES completion:^{ //[self->toolBoxViewController setupConstraints]; }]; @@ -426,6 +427,7 @@ }); } } else { + [self->_streamView insertSubview:self->_streamVideoRenderView atIndex:0]; // Fallback on earlier versions } @@ -887,7 +889,9 @@ - (void) returnToMainFrame { // Reset display mode back to default [self updatePreferredDisplayMode:NO]; - [SceneDelegate clearExternalDisplayRenderView]; + if (@available(iOS 13.0, *)) { + [SceneDelegate clearExternalDisplayRenderView]; + } if (_settings.enablePIP) { [self cleanupPiPController]; @@ -907,11 +911,13 @@ - (void)extScreenDidConnect:(NSNotification *)notification { Log(LOG_I, @"External Screen Connected"); if ([self isAirPlayEnabled] && [notification.object isKindOfClass:[UIScreen class]]) { - UIScreen *extScreen = (UIScreen *)notification.object; + // UIScreen *extScreen = (UIScreen *)notification.object; if (_streamVideoRenderView) { // Remove from current superview before passing it [_streamVideoRenderView removeFromSuperview]; - [SceneDelegate setExternalDisplayRenderView:_streamVideoRenderView]; + if (@available(iOS 13.0, *)) { + [SceneDelegate setExternalDisplayRenderView:_streamVideoRenderView]; + } NSNotificationCenter* nc = [NSNotificationCenter defaultCenter]; [nc postNotificationName:@"ScreenChanged" object:self]; } else { @@ -924,7 +930,9 @@ - (void)extScreenDidDisconnect:(NSNotification *)notification { Log(LOG_I, @"External Screen Disconnected"); if(UIScreen.screens.count < 2) { - [SceneDelegate clearExternalDisplayRenderView]; + if (@available(iOS 13.0, *)) { + [SceneDelegate clearExternalDisplayRenderView]; + } // Add the render view back to the local StreamView if AirPlay was active if ([self isAirPlayEnabled]) { if (_streamVideoRenderView && _streamView) { @@ -955,9 +963,13 @@ - (void) reloadAirPlayConfig{ if (UIScreen.screens.count == 1){return;} if (![self isAirPlaying] && [self isAirPlayEnabled]){ - [SceneDelegate setExternalDisplayRenderView:_streamVideoRenderView]; + if (@available(iOS 13.0, *)) { + [SceneDelegate setExternalDisplayRenderView:_streamVideoRenderView]; + } }else if ([self isAirPlaying] && ![self isAirPlayEnabled]){ - [SceneDelegate clearExternalDisplayRenderView]; + if (@available(iOS 13.0, *)) { + [SceneDelegate clearExternalDisplayRenderView]; + } } } diff --git a/VoidLink/ViewControllers/ToolboxViewController.swift b/VoidLink/ViewControllers/ToolboxViewController.swift index 4823c99f..557fe154 100644 --- a/VoidLink/ViewControllers/ToolboxViewController.swift +++ b/VoidLink/ViewControllers/ToolboxViewController.swift @@ -27,7 +27,7 @@ import UIKit private let exitButton = UIButton(type: .system) private let pinButton = UIButton(type: .system) private let viewBackgroundColor = UIColor(white: 0.2, alpha: 0.8); - private let highlightColor = UIColor(white: 0.39, alpha: 0.8); + private let highlightColor = UIColor(white: 0.55, alpha: 0.8); private let titleLabel = UILabel() @objc public var specialEntries : NSMutableArray = ["widgetSwitchTool", "widgetLayoutTool", "bringUpSoftKeyboard", "enterPip", "toggleStatsOverlay"] private let specialEntryAliasDic : [String:String] = [ @@ -90,7 +90,8 @@ import UIKit view.backgroundColor = viewBackgroundColor tableView.backgroundColor = .clear tableView.rowHeight = isIPhone() ? 47 : 60 - tableView.separatorColor = highlightColor + tableView.separatorColor = .white.withAlphaComponent(0.33) + tableView.separatorInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10) // Configure buttons addButton.setTitle(SwiftLocalizationHelper.localizedString(forKey: "Add / Duplicate"), for: .normal) deleteButton.setTitle(SwiftLocalizationHelper.localizedString(forKey: "Delete"), for: .normal) @@ -151,8 +152,8 @@ import UIKit NSLayoutConstraint.activate([ // Set the width and height of the view - view.widthAnchor.constraint(equalTo: view.superview!.widthAnchor, multiplier: isIPhone() ? 0.6 : 0.8), - view.heightAnchor.constraint(equalTo: view.superview!.heightAnchor, multiplier: 0.99), + view.widthAnchor.constraint(equalTo: view.superview!.widthAnchor, multiplier: isIPhone() ? 0.6 : 0.52), + view.heightAnchor.constraint(equalTo: view.superview!.heightAnchor, multiplier: 0.93), // Set the width and height of the view //view.leadingAnchor.constraint(equalTo: view.superview!.leadingAnchor, constant: 60), //view.trailingAnchor.constraint(equalTo: view.superview!.trailingAnchor, constant: -60), @@ -312,6 +313,7 @@ import UIKit // Configure cell appearance cell.backgroundColor = .clear // Set background color of the cell cell.textLabel?.textColor = UIColor.white // Set font color of the text + cell.textLabel?.font = UIFont.systemFont(ofSize: 18.5) // Set selected background view