feat: update storyboard and translations for pip

This commit is contained in:
Acaki
2025-07-11 19:40:07 +08:00
parent fc73e7a3b2
commit 879c2f368c
7 changed files with 121 additions and 26 deletions
+26 -3
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="EVd-wq-ego">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="EVd-wq-ego">
<device id="ipad11_0rounded" orientation="portrait" layout="fullscreen" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Image references" minToolsVersion="12.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -870,12 +870,33 @@
<constraint firstAttribute="width" constant="380" id="pkz-ek-bOk"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" spacing="20" id="12a-Wi-LlL" userLabel="pipStack">
<rect key="frame" x="293" y="1899" width="280" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enable PiP" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3rP-dh-TJi" userLabel="pipLabel">
<rect key="frame" x="0.0" y="0.0" width="130" height="31"/>
<constraints>
<constraint firstAttribute="width" constant="130" id="ir2-ut-mD3"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VTC-Z9-IYM" userLabel="pipSwitch">
<rect key="frame" x="150" y="0.0" width="132" height="31"/>
<constraints>
<constraint firstAttribute="width" constant="130" id="ADb-7C-hgx"/>
</constraints>
</switch>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<size key="freeformSize" width="682" height="2500"/>
<connections>
<outlet property="HdrStack" destination="dH7-Sy-EdJ" id="lVV-l0-VBW"/>
<outlet property="HdrStack" destination="12a-Wi-LlL" id="bbr-VY-n5y"/>
<outlet property="audioConfigSelector" destination="iZL-dA-jk9" id="Yja-os-o6g"/>
<outlet property="audioConfigStack" destination="qnG-5F-2YY" id="kFX-VK-vuK"/>
<outlet property="audioOnPcStack" destination="Bbr-Wj-Z75" id="c2K-3R-whg"/>
@@ -916,6 +937,8 @@
<outlet property="onscreenControllerLabel" destination="LGV-5y-piG" id="GsV-fS-lX9"/>
<outlet property="optimizeGamesStack" destination="TvS-69-vcF" id="pm1-0c-dCR"/>
<outlet property="optimizeGamesSwitch" destination="Sui-Ig-YxN" id="Lxu-si-ugy"/>
<outlet property="pipStack" destination="12a-Wi-LlL" id="eTJ-0h-hRB"/>
<outlet property="pipSwitch" destination="VTC-Z9-IYM" id="gzC-rU-DoP"/>
<outlet property="pointerVelocityDividerStack" destination="b1U-nD-gYE" id="ep1-K3-rKj"/>
<outlet property="pointerVelocityFactorStack" destination="vdk-mK-ztu" id="Cik-Rh-pGS"/>
<outlet property="pointerVelocityModeDividerSlider" destination="AcZ-2i-GI4" id="dGf-ZU-w3S"/>
+27 -6
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="DL0-L5-LOv">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="DL0-L5-LOv">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Image references" minToolsVersion="12.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -13,7 +13,7 @@
<objects>
<viewController id="dgh-JZ-Q7z" customClass="MainFrameViewController" sceneMemberID="viewController">
<collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" id="Rtu-AT-Alw" customClass="AppCollectionView">
<rect key="frame" x="0.0" y="0.0" width="414" height="756"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="804"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.3333333432674408" green="0.3333333432674408" blue="0.3333333432674408" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="15" minimumInteritemSpacing="15" id="YcZ-cR-3tK">
@@ -80,7 +80,7 @@
<objects>
<navigationController id="ftZ-kC-fxI" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" barStyle="black" translucent="NO" id="0ZA-Ec-QgD">
<rect key="frame" x="0.0" y="96" width="414" height="44"/>
<rect key="frame" x="0.0" y="48" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="barTintColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -636,12 +636,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="48" width="692" height="325"/>
<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"/>
<rect key="frame" x="80" y="48" width="692" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="R90-2b-UrU"/>
</constraints>
@@ -1520,6 +1520,27 @@
<constraint firstAttribute="width" constant="380" id="zIc-GX-mTA"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" spacing="20" id="hvN-TZ-ziV" userLabel="pipStack">
<rect key="frame" x="278" y="1618" width="280" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enable PiP" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Ul-P6-eUk" userLabel="pipLabel">
<rect key="frame" x="0.0" y="0.0" width="130" height="31"/>
<constraints>
<constraint firstAttribute="width" constant="130" id="BBk-4S-vkO"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="mgR-dj-4gu" userLabel="pipSwitch">
<rect key="frame" x="150" y="0.0" width="132" height="31"/>
<constraints>
<constraint firstAttribute="width" constant="130" id="ke0-cJ-jZt"/>
</constraints>
</switch>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
@@ -1147,21 +1147,6 @@ static NSMutableSet* hostList;
// If we moved back to the center position, we should save the settings
SettingsViewController* settingsViewController = (SettingsViewController*)[revealController rearViewController];
settingsViewController.mainFrameViewController = self;
// enable / disable widgets acoordingly: in streamview, disable, outside of streamview, enable.
[settingsViewController.resolutionSelector setEnabled:!self.settingsExpandedInStreamView];
[settingsViewController.framerateSelector setEnabled:!self.settingsExpandedInStreamView];
[settingsViewController widget:settingsViewController.bitrateSlider setEnabled:!self.settingsExpandedInStreamView];
[settingsViewController.optimizeSettingsSelector setEnabled:!self.settingsExpandedInStreamView];
[settingsViewController.audioOnPCSelector setEnabled:!self.settingsExpandedInStreamView];
[settingsViewController.codecSelector setEnabled:!self.settingsExpandedInStreamView];
[settingsViewController.yuv444Selector setEnabled:!self.settingsExpandedInStreamView];
[settingsViewController.pipSelector setEnabled:!self.settingsExpandedInStreamView];
[settingsViewController.hdrSelector setEnabled:!self.settingsExpandedInStreamView];
[settingsViewController.framePacingSelector setEnabled:!self.settingsExpandedInStreamView];
[settingsViewController.btMouseSelector setEnabled:!self.settingsExpandedInStreamView];
[settingsViewController.externalDisplayModeSelector setEnabled:!self.settingsExpandedInStreamView];
[settingsViewController.backToStreamingButton setEnabled:self.settingsExpandedInStreamView];
// [settingsViewController.unlockDisplayOrientationSelector setEnabled:!self.settingsExpandedInStreamView && [self isFullScreenRequired]];//need "requires fullscreen" enabled in the app bunddle to make runtime orientation limitation woring
if (position == FrontViewPositionLeft) {
[settingsViewController saveSettings];
@@ -47,6 +47,7 @@
@property (strong, nonatomic) IBOutlet UISwitch *audioOnPcSwitch;
@property (strong, nonatomic) IBOutlet UIStackView *codecStack;
@property (strong, nonatomic) IBOutlet UIStackView *yuv444Stack;
@property (strong, nonatomic) IBOutlet UIStackView *pipStack;
@property (strong, nonatomic) IBOutlet UIStackView *HdrStack;
@property (strong, nonatomic) IBOutlet UIStackView *framepacingStack;
@property (strong, nonatomic) IBOutlet UIStackView *reverseMouseWheelDirectionStack;
@@ -72,6 +73,7 @@
@property (strong, nonatomic) IBOutlet UISegmentedControl *codecSelector;
@property (strong, nonatomic) IBOutlet UISwitch *hdrSwitch;
@property (strong, nonatomic) IBOutlet UISwitch *yuv444Switch;
@property (strong, nonatomic) IBOutlet UISwitch *pipSwitch;
@property (strong, nonatomic) IBOutlet UISegmentedControl *framePacingSelector;
@property (strong, nonatomic) IBOutlet UISegmentedControl *reverseMouseWheelDirectionSelector;
@property (strong, nonatomic) IBOutlet UISegmentedControl *statsOverlaySelector;
@@ -253,7 +253,7 @@ BOOL isCustomResolution(CGSize res) {
}
- (void)updateResolutionTable{
UIWindow *window = UIApplication.sharedApplication.windows.firstObject;
UIWindow *window = self.view.window;
CGFloat screenScale = window.screen.scale;
CGFloat safeAreaWidth = (window.frame.size.width - window.safeAreaInsets.left - window.safeAreaInsets.right) * screenScale;
CGFloat appWindowWidth = window.frame.size.width * screenScale;
@@ -482,6 +482,7 @@ BOOL isCustomResolution(CGSize res) {
[self addSetting:self.codecStack ofId:@"codecStack" withInfoTag:NO withDynamicLabel:NO to:videoSection];
[self addSetting:self.HdrStack ofId:@"HdrStack" withInfoTag:NO withDynamicLabel:NO to:videoSection];
[self addSetting:self.yuv444Stack ofId:@"yuv444Stack" withInfoTag:YES withDynamicLabel:NO to:videoSection];
[self addSetting:self.pipStack ofId:@"pipStack" withInfoTag:YES withDynamicLabel:NO to:videoSection];
[videoSection addToParentStack:_parentStack];
[videoSection setExpanded:YES];
@@ -1245,6 +1246,7 @@ BOOL isCustomResolution(CGSize res) {
}
[self.yuv444Switch setOn:currentSettings.enableYUV444];
[self.pipSwitch setOn:currentSettings.enablePIP];
[self.statsOverlaySelector setSelectedSegmentIndex:currentSettings.statsOverlayLevel.intValue];
[self.citrixX1MouseSwitch setOn:currentSettings.btMouseSupport];
[self.optimizeGamesSwitch setOn: currentSettings.optimizeGames];
@@ -1957,6 +1959,7 @@ BOOL isCustomResolution(CGSize res) {
BOOL audioOnPC = self.audioOnPcSwitch.isOn;
uint32_t preferredCodec = [self getChosenCodecPreference];
BOOL enableYUV444 = self.yuv444Switch.isOn;
BOOL enablePIP = self.pipSwitch.isOn;
BOOL btMouseSupport = self.citrixX1MouseSwitch.isOn;
BOOL useFramePacing = [self.framePacingSelector selectedSegmentIndex] == 1;
NSInteger touchMode = [self isNotNativeTouchOnly] ? self.touchModeSelector.selectedSegmentIndex : NativeTouchOnly;
@@ -1993,6 +1996,7 @@ BOOL isCustomResolution(CGSize res) {
audioOnPC:audioOnPC
preferredCodec:preferredCodec
enableYUV444:enableYUV444
enablePIP:enablePIP
useFramePacing:useFramePacing
enableHdr:enableHdr
btMouseSupport:btMouseSupport
+31 -1
View File
@@ -43,6 +43,36 @@
}
}
},
"3rP-dh-TJi.text" : {
"comment" : "Class = \"UILabel\"; text = \"Enable PiP\"; ObjectID = \"3rP-dh-TJi\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Enable PiP"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "启用画中画观察模式"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "啟用子母畫面觀察模式"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "啟用子母畫面觀察模式"
}
}
}
},
"4FU-iP-c6T.segmentTitles[0]" : {
"comment" : "Class = \"UISegmentedControl\"; 4FU-iP-c6T.segmentTitles[0] = \"Captured\"; ObjectID = \"4FU-iP-c6T\";",
"extractionState" : "extracted_with_value",
@@ -3135,4 +3165,4 @@
}
},
"version" : "1.0"
}
}
+30
View File
@@ -211,6 +211,36 @@
}
}
},
"4Ul-P6-eUk.text" : {
"comment" : "Class = \"UILabel\"; text = \"Enable PiP\"; ObjectID = \"4Ul-P6-eUk\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Enable PiP"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "启用画中画观察模式"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "啟用子母畫面觀察模式"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "啟用子母畫面觀察模式"
}
}
}
},
"5JB-m0-nUF.text" : {
"comment" : "Class = \"UILabel\"; text = \"YUV 4:4:4\"; ObjectID = \"5JB-m0-nUF\";",
"extractionState" : "extracted_with_value",