Merge branch 'iOS12_compatibility' into Integration
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
@property (strong, nonatomic) NSString *pcUuidToLoad;
|
||||
@property (strong, nonatomic) void (^shortcutCompletionHandler)(BOOL);
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -1618,11 +1618,11 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView opaque="NO" clearsContextBeforeDrawing="NO" alpha="0.5" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="BA3-hd-bDp">
|
||||
<rect key="frame" x="50" y="0.0" width="1033" height="744"/>
|
||||
<rect key="frame" x="198.5" y="60" width="736" height="634"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableView>
|
||||
<navigationBar clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="62V-DN-FUk">
|
||||
<rect key="frame" x="50" y="0.0" width="1033" height="44"/>
|
||||
<navigationBar clipsSubviews="YES" alpha="0.69999999999999996" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="62V-DN-FUk">
|
||||
<rect key="frame" x="198.5" y="60" width="736" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="lQr-5u-g05"/>
|
||||
</constraints>
|
||||
@@ -1663,13 +1663,13 @@
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="62V-DN-FUk" firstAttribute="leading" secondItem="PlJ-LJ-d1p" secondAttribute="leading" constant="50" id="5fw-ZV-2GR"/>
|
||||
<constraint firstAttribute="bottom" secondItem="BA3-hd-bDp" secondAttribute="bottom" id="5xN-fy-xH7"/>
|
||||
<constraint firstAttribute="trailing" secondItem="62V-DN-FUk" secondAttribute="trailing" constant="50" id="7ZT-th-hPo"/>
|
||||
<constraint firstItem="BA3-hd-bDp" firstAttribute="leading" secondItem="PlJ-LJ-d1p" secondAttribute="leading" constant="50" id="AYr-wz-Qrt"/>
|
||||
<constraint firstItem="BA3-hd-bDp" firstAttribute="top" secondItem="62V-DN-FUk" secondAttribute="top" id="TgZ-Pm-jit"/>
|
||||
<constraint firstItem="62V-DN-FUk" firstAttribute="top" secondItem="PlJ-LJ-d1p" secondAttribute="top" symbolic="YES" id="g6N-4g-Wej"/>
|
||||
<constraint firstAttribute="trailing" secondItem="BA3-hd-bDp" secondAttribute="trailing" constant="50" id="iwN-Gw-g4S"/>
|
||||
<constraint firstItem="62V-DN-FUk" firstAttribute="top" secondItem="BA3-hd-bDp" secondAttribute="top" id="600-lH-rte"/>
|
||||
<constraint firstItem="62V-DN-FUk" firstAttribute="width" secondItem="PlJ-LJ-d1p" secondAttribute="width" multiplier="0.65" id="OWL-Yd-KfG"/>
|
||||
<constraint firstItem="BA3-hd-bDp" firstAttribute="centerX" secondItem="PlJ-LJ-d1p" secondAttribute="centerX" id="Xte-bA-pFb"/>
|
||||
<constraint firstItem="BA3-hd-bDp" firstAttribute="width" secondItem="PlJ-LJ-d1p" secondAttribute="width" multiplier="0.65" id="eQf-gF-6kX"/>
|
||||
<constraint firstItem="BA3-hd-bDp" firstAttribute="top" secondItem="PlJ-LJ-d1p" secondAttribute="top" constant="60" id="eje-7O-RaF"/>
|
||||
<constraint firstItem="BA3-hd-bDp" firstAttribute="bottom" secondItem="PlJ-LJ-d1p" secondAttribute="bottom" constant="-50" id="j96-Mz-xiG"/>
|
||||
<constraint firstItem="62V-DN-FUk" firstAttribute="centerX" secondItem="PlJ-LJ-d1p" secondAttribute="centerX" id="qmh-Pp-B9S"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<toolbarItems/>
|
||||
@@ -1696,19 +1696,19 @@
|
||||
<image name="tray.full.fill" catalog="system" width="128" height="88"/>
|
||||
<image name="video.and.waveform" catalog="system" width="128" height="94"/>
|
||||
<systemColor name="linkColor">
|
||||
<color red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemBrownColor">
|
||||
<color red="0.63529411764705879" green="0.51764705882352946" blue="0.36862745098039218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color red="0.63529411759999999" green="0.51764705879999995" blue="0.36862745099999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemGray3Color">
|
||||
<color red="0.7803921568627451" green="0.7803921568627451" blue="0.80000000000000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color red="0.78039215689999997" green="0.78039215689999997" blue="0.80000000000000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemTealColor">
|
||||
<color red="0.18823529411764706" green="0.69019607843137254" blue="0.7803921568627451" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color red="0.18823529410000001" green="0.69019607839999997" blue="0.78039215689999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -676,12 +676,12 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView opaque="NO" clearsContextBeforeDrawing="NO" alpha="0.5" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="kTH-ez-aKD">
|
||||
<rect key="frame" x="80" y="96" width="692" height="277"/>
|
||||
<rect key="frame" x="80" y="112" width="692" height="261"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableView>
|
||||
<navigationBar contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zsA-6X-Qc5">
|
||||
<rect key="frame" x="80" y="96" width="692" height="44"/>
|
||||
<navigationBar alpha="0.69999999999999996" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zsA-6X-Qc5">
|
||||
<rect key="frame" x="80" y="112" width="692" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="R90-2b-UrU"/>
|
||||
</constraints>
|
||||
@@ -727,8 +727,8 @@
|
||||
<constraint firstAttribute="trailing" secondItem="kTH-ez-aKD" secondAttribute="trailing" constant="80" id="ArS-pG-QUR"/>
|
||||
<constraint firstItem="kTH-ez-aKD" firstAttribute="leading" secondItem="bTO-bs-q93" secondAttribute="leading" constant="80" id="Ujg-Sw-4hq"/>
|
||||
<constraint firstAttribute="trailing" secondItem="zsA-6X-Qc5" secondAttribute="trailing" constant="80" id="YKK-qs-mZR"/>
|
||||
<constraint firstItem="zsA-6X-Qc5" firstAttribute="top" secondItem="bTO-bs-q93" secondAttribute="topMargin" id="gZg-eJ-rnP"/>
|
||||
<constraint firstItem="kTH-ez-aKD" firstAttribute="top" secondItem="Nat-X1-41w" secondAttribute="bottom" id="txs-Df-ANQ"/>
|
||||
<constraint firstItem="zsA-6X-Qc5" firstAttribute="top" secondItem="bTO-bs-q93" secondAttribute="topMargin" constant="16" id="gZg-eJ-rnP"/>
|
||||
<constraint firstItem="kTH-ez-aKD" firstAttribute="top" secondItem="zsA-6X-Qc5" secondAttribute="top" id="txs-Df-ANQ"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<size key="freeformSize" width="852" height="393"/>
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<!DOCTYPE svg
|
||||
PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 21.6992 21.3379">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 23.0366 22.6982">
|
||||
<g>
|
||||
<rect height="21.3379" opacity="0" width="21.6992" x="0" y="0"/>
|
||||
<path d="M21.3379 10.6641C21.3379 16.5527 16.5625 21.3281 10.6641 21.3281C4.77539 21.3281 0 16.5527 0 10.6641C0 4.77539 4.77539 0 10.6641 0C16.5625 0 21.3379 4.77539 21.3379 10.6641ZM7.31445 7.51953L7.31445 13.7793C7.31445 14.8926 8.38867 15.3809 9.31641 14.834L14.4922 11.7871C15.3711 11.2598 15.3613 10.0293 14.4922 9.52148L9.31641 6.47461C8.36914 5.9082 7.31445 6.40625 7.31445 7.51953Z" fill="white" fill-opacity="0.85"/>
|
||||
<rect height="22.6982" opacity="0" width="23.0366" x="0" y="0"/>
|
||||
<path d="M22.6929 11.3438C22.6929 17.6011 17.6118 22.6875 11.3438 22.6875C5.08643 22.6875 0 17.6011 0 11.3438C0 5.08105 5.08643 0 11.3438 0C17.6118 0 22.6929 5.08105 22.6929 11.3438ZM7.92773 7.69141L7.92773 14.9854C7.92773 15.8662 8.81396 16.2583 9.58203 15.8018L15.5815 12.2676C16.2959 11.8379 16.2852 10.8389 15.5815 10.4253L9.58203 6.88037C8.82471 6.4292 7.92773 6.81592 7.92773 7.69141Z" fill="black" fill-opacity="0.5"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 829 B After Width: | Height: | Size: 829 B |
@@ -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" : {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
API_AVAILABLE(ios(13.0))
|
||||
@interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow * window;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#import "SceneDelegate.h"
|
||||
#import "StreamFrameViewController.h"
|
||||
|
||||
API_AVAILABLE(ios(13.0))
|
||||
@implementation SceneDelegate
|
||||
|
||||
static UIView *_sharedStreamVideoRenderView = nil;
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
+11
-7
@@ -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.tintColor = [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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
}
|
||||
|
||||
@@ -1211,7 +1211,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];
|
||||
}
|
||||
@@ -1231,7 +1231,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;
|
||||
@@ -1240,18 +1241,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
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -573,7 +573,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];
|
||||
@@ -941,6 +943,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;
|
||||
@@ -1288,14 +1291,17 @@ BOOL isCustomResolution(int resolutionSelected) {
|
||||
_bitrate = bitrateTable[[self getSliderValueForBitrate:[currentSettings.bitrate 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];
|
||||
@@ -1343,7 +1349,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:
|
||||
@@ -2053,7 +2059,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];
|
||||
@@ -2067,7 +2082,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];
|
||||
@@ -2088,11 +2103,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) saveSettings {
|
||||
|
||||
@@ -247,6 +247,7 @@
|
||||
toolBoxViewController = [[ToolboxViewController alloc] init];
|
||||
toolBoxViewController.specialEntryDelegate = self;
|
||||
toolBoxViewController.specialEntries = oldToolboxVC.specialEntries;
|
||||
toolBoxViewController.modalPresentationStyle = UIModalPresentationOverCurrentContext;
|
||||
[self presentViewController:toolBoxViewController animated:YES completion:^{
|
||||
//[self->toolBoxViewController setupConstraints];
|
||||
}];
|
||||
@@ -369,6 +370,7 @@
|
||||
});
|
||||
}
|
||||
} else {
|
||||
[self->_streamView insertSubview:self->_streamVideoRenderView atIndex:0];
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
|
||||
@@ -810,7 +812,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];
|
||||
@@ -830,11 +834,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 {
|
||||
@@ -847,7 +853,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) {
|
||||
@@ -878,9 +886,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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,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"]
|
||||
private let specialEntryAliasDic : [String:String] = [
|
||||
@@ -88,7 +88,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)
|
||||
@@ -149,8 +150,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),
|
||||
@@ -310,6 +311,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
|
||||
|
||||
Reference in New Issue
Block a user