ui tweaks for frame pacing & perfGraph setting stacks

This commit is contained in:
TrueZhuanjia
2025-08-25 22:45:12 +08:00
parent 370cc76dbe
commit e619d31622
6 changed files with 107 additions and 162 deletions
+7 -7
View File
@@ -988,8 +988,8 @@
<constraint firstAttribute="width" constant="380" id="K66-qD-1fF"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="oZG-5Y-pw5" userLabel="framePacing Stack">
<rect key="frame" x="420" y="1189" width="380" height="56.5"/>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="oZG-5Y-pw5" userLabel="framePacing Stack">
<rect key="frame" x="440" y="1289" width="380" height="56.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Frame Pacing Mode" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MaN-f7-I3g" userLabel="Frame Pacing Mode">
<rect key="frame" x="0.0" y="0.0" width="380" height="20.5"/>
@@ -1001,7 +1001,7 @@
<rect key="frame" x="0.0" y="25.5" width="380" height="32"/>
<segments>
<segment title="Legacy"/>
<segment title="Queue"/>
<segment title="Queue Buffering"/>
</segments>
<color key="tintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="selectedSegmentTintColor" systemColor="linkColor"/>
@@ -1788,7 +1788,7 @@
<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.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="secondarySystemGroupedBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -1797,13 +1797,13 @@
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemBrownColor">
<color red="0.63529411759999999" green="0.51764705879999995" blue="0.36862745099999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.63529411764705879" green="0.51764705882352946" blue="0.36862745098039218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemGray3Color">
<color red="0.78039215689999997" green="0.78039215689999997" blue="0.80000000000000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.7803921568627451" green="0.7803921568627451" blue="0.80000000000000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemTealColor">
<color red="0.18823529410000001" green="0.69019607839999997" blue="0.78039215689999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.18823529411764706" green="0.69019607843137254" blue="0.7803921568627451" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
+5 -5
View File
@@ -1696,7 +1696,7 @@
<rect key="frame" x="0.0" y="25.5" width="380" height="32"/>
<segments>
<segment title="Legacy"/>
<segment title="Queue"/>
<segment title="Queue Buffering"/>
</segments>
<color key="tintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="selectedSegmentTintColor" systemColor="linkColor"/>
@@ -1821,19 +1821,19 @@
<image name="trash.fill" catalog="system" width="117" height="128"/>
<image name="tray.full.fill" catalog="system" width="128" height="88"/>
<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="secondarySystemGroupedBackgroundColor">
<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="systemGray2Color">
<color red="0.68235294117647061" green="0.68235294117647061" blue="0.69803921568627447" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.68235294120000001" green="0.68235294120000001" blue="0.69803921570000005" 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>
+23 -23
View File
@@ -24,6 +24,29 @@
}
}
},
" %d%% opacity " : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : " %d%%不透明度 "
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : " %d%%不透明度 "
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : " %d%%不透明度 "
}
}
}
},
" disconnect " : {
"extractionState" : "manual",
"localizations" : {
@@ -421,29 +444,6 @@
}
}
},
"%d%% opacity" : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "%d%%不透明度"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "%d%%不透明度"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "%d%%不透明度"
}
}
}
},
"%d%% screen width" : {
"extractionState" : "manual",
"localizations" : {
@@ -40,6 +40,8 @@
CGFloat _scrollSpeed;
CGFloat _currentRefreshRate;
MenuSectionView *touchAndControlSection;
MenuSectionView *videoSection;
MenuSectionView *otherSection;
NSMutableSet* hiddenStacks;
}
@@ -543,7 +545,7 @@ BOOL isCustomResolution(int resolutionSelected) {
}
- (void)layoutSections{
MenuSectionView *videoSection = [[MenuSectionView alloc] init];
videoSection = [[MenuSectionView alloc] init];
videoSection.delegate = self;
videoSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Video"];
if (@available(iOS 13.0, *)) {
@@ -557,8 +559,8 @@ BOOL isCustomResolution(int resolutionSelected) {
[self addSetting:self.yuv444Stack ofId:@"yuv444Stack" withInfoTag:YES withDynamicLabel:NO to:videoSection];
[self addSetting:self.pipStack ofId:@"pipStack" withInfoTag:YES withDynamicLabel:NO to:videoSection];
[self addSetting:self.pipStack ofId:@"pipStack" withInfoTag:YES withDynamicLabel:NO to:videoSection];
[self addSetting:self.frameQueueSizeStack ofId:@"frameQueueSizeStack" withInfoTag:NO withDynamicLabel:YES to:videoSection];
[self addSetting:self.framePacingStack ofId:@"framePacingStack" withInfoTag:YES withDynamicLabel:NO to:videoSection];
[self addSetting:self.frameQueueSizeStack ofId:@"frameQueueSizeStack" withInfoTag:NO withDynamicLabel:YES to:videoSection];
// Only show Metal renderer option on iOS 17+ where CAMetalDisplayLink is available
if (@available(iOS 17.0, *)) {
@@ -630,7 +632,7 @@ BOOL isCustomResolution(int resolutionSelected) {
[audioSection setExpanded:YES];
MenuSectionView *otherSection = [[MenuSectionView alloc] init];
otherSection = [[MenuSectionView alloc] init];
otherSection.delegate = self;
otherSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Others"];
if (@available(iOS 13.0, *)) {
@@ -1489,8 +1491,8 @@ BOOL isCustomResolution(int resolutionSelected) {
[self frameQueueSizeSliderMoved:self.frameQueueSizeSlider];
[self.enableGraphsSwitch setOn:currentSettings.enableGraphs animated:NO]; // Add this line
[self.enableGraphsSwitch addTarget:self action:@selector(enableGraphsChanged) forControlEvents:UIControlEventValueChanged];
[self enableGraphsChanged];
[self.enableGraphsSwitch addTarget:self action:@selector(enableGraphsChanged:) forControlEvents:UIControlEventValueChanged];
[self enableGraphsChanged:self.enableGraphsSwitch];
[self.graphOpacityStepper setMinimumValue:0];
[self.graphOpacityStepper setMaximumValue:100];
[self.graphOpacityStepper setValue:(int)currentSettings.graphOpacity.intValue];
@@ -1738,21 +1740,35 @@ BOOL isCustomResolution(int resolutionSelected) {
}
- (void)framePacingModeChanged:(UISegmentedControl *)sender {
[self setHidden:sender.selectedSegmentIndex == FramePacingModeLegacy forStack:self.frameQueueSizeStack];
[videoSection updateViewForFoldState];
if(sender.selectedSegmentIndex == FramePacingModeLegacy){
[self.enableGraphsSwitch setOn:NO];
[self findDynamicLabelFromStack:_graphOpacityStack].hidden = YES;
}
[self.enableGraphsSwitch setEnabled:sender.selectedSegmentIndex == FramePacingModeQueue];
[self.graphOpacityStepper setEnabled:self.enableGraphsSwitch.isOn];
[self setHidden:sender.selectedSegmentIndex == FramePacingModeLegacy forStack:self.performanceGraphStack];
[otherSection updateViewForFoldState];
/*
if (sender.selectedSegmentIndex == FramePacingModeLegacy) {
// Legacy mode selected - disable frames to buffer and graph settings
[self.frameQueueSizeSlider setEnabled:NO];
[self.enableGraphsSwitch setOn:NO animated:YES];
[self.enableGraphsSwitch setEnabled:NO];
[self.graphOpacityStepper setEnabled:NO];
} else {
// Queue mode selected - enable frames to buffer and graph settings
[self.frameQueueSizeSlider setEnabled:YES];
[self.enableGraphsSwitch setEnabled:YES];
if (self.enableGraphsSwitch.isOn) {
[self.graphOpacityStepper setEnabled:YES];
}
}
}*/
}
- (void)onScreenWidgetChanged{
@@ -2267,8 +2283,9 @@ BOOL isCustomResolution(int resolutionSelected) {
[self findDynamicLabelFromStack:_frameQueueSizeStack].text = [NSString stringWithFormat:@" %d ", (int)self.frameQueueSizeSlider.value];
}
- (void) enableGraphsChanged {
[self.graphOpacityStepper setEnabled:[self.enableGraphsSwitch isOn]];
- (void) enableGraphsChanged:(UISwitch* )sender {
[self.graphOpacityStepper setEnabled:sender.isOn];
[self findDynamicLabelFromStack:self.graphOpacityStack].hidden = !sender.isOn;
}
- (void) graphOpacityStepperTapped:(UIStepper* )sender {
+32 -74
View File
@@ -44,49 +44,49 @@
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "旧版"
"value" : "传统模式"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "舊版"
"value" : "傳統模式"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "舊版"
"value" : "傳統模式"
}
}
}
},
"2Dp-Qg-chi.segmentTitles[1]" : {
"comment" : "Class = \"UISegmentedControl\"; 2Dp-Qg-chi.segmentTitles[1] = \"Queue\"; ObjectID = \"2Dp-Qg-chi\";",
"comment" : "Class = \"UISegmentedControl\"; 2Dp-Qg-chi.segmentTitles[1] = \"Queue Buffering\"; ObjectID = \"2Dp-Qg-chi\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Queue"
"value" : "Queue Buffering"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "佇列"
"state" : "needs_review",
"value" : "队列缓冲"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "佇列"
"state" : "needs_review",
"value" : "佇列緩衝"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "佇列"
"state" : "needs_review",
"value" : "佇列緩衝"
}
}
}
@@ -1033,36 +1033,6 @@
}
}
},
"ccm-n2-PXi.text" : {
"comment" : "Class = \"UILabel\"; text = \"Performance Graphs - Opacity: 50%\"; ObjectID = \"ccm-n2-PXi\";",
"extractionState" : "stale",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Performance Graphs - Opacity: 50%"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "性能图表 - 不透明度:50%"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "效能圖表 - 不透明度:50%"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "效能圖表 - 不透明度:50%"
}
}
}
},
"Ce3-FM-vIh.text" : {
"comment" : "Class = \"UILabel\"; text = \"Frames to Buffer\"; ObjectID = \"Ce3-FM-vIh\";",
"extractionState" : "extracted_with_value",
@@ -1411,36 +1381,6 @@
}
}
},
"dK2-1g-PUQ.text" : {
"comment" : "Class = \"UILabel\"; text = \"Displays frametime and buffer health metrics. Adjust the opacity if they obscure parts of the screen. Swipe up/down with two fingers to show or hide all stats.\"; ObjectID = \"dK2-1g-PUQ\";",
"extractionState" : "stale",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Displays frametime and buffer health metrics. Adjust the opacity if they obscure parts of the screen. Swipe up/down with two fingers to show or hide all stats."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "显示帧时间和缓冲健康指标。如果遮挡屏幕部分内容,请调整透明度。用两指上下滑动以显示或隐藏所有统计信息。"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "顯示影格時間與緩衝健康指標。如遮擋螢幕部分內容,請調整透明度。用兩指上下滑動以顯示或隱藏所有統計資訊。"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "顯示影格時間與緩衝健康指標。如遮擋螢幕部分內容,請調整透明度。用兩指上下滑動以顯示或隱藏所有統計資訊。"
}
}
}
},
"dOF-FW-cBU.text" : {
"comment" : "Class = \"UILabel\"; text = \" \"; ObjectID = \"dOF-FW-cBU\";",
"extractionState" : "extracted_with_value",
@@ -2384,19 +2324,19 @@
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "帧缓冲模式"
"value" : "帧步进控制"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "幀緩衝模式"
"value" : "影格步調"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "幀緩衝模式"
"value" : "影格步調"
}
}
}
@@ -3322,6 +3262,24 @@
"state" : "new",
"value" : "Performance Graphs "
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "性能图表"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "效能圖表"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "效能圖表"
}
}
}
},
+14 -44
View File
@@ -91,36 +91,6 @@
}
}
},
"3Ff-AF-K42.text" : {
"comment" : "Class = \"UILabel\"; text = \"Displays frametime and buffer health metrics. Adjust the opacity if they obscure parts of the screen. Swipe up/down with two fingers to show or hide all stats.\"; ObjectID = \"3Ff-AF-K42\";",
"extractionState" : "stale",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Displays frametime and buffer health metrics. Adjust the opacity if they obscure parts of the screen. Swipe up/down with two fingers to show or hide all stats."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "显示帧时间和缓冲健康指标。如果遮挡屏幕部分内容,请调整透明度。"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "顯示影格時間與緩衝健康指標。如遮擋螢幕部分內容,請調整透明度。"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "顯示影格時間與緩衝健康指標。如遮擋螢幕部分內容,請調整透明度。"
}
}
}
},
"3Hh-2q-gas.text" : {
"comment" : "Class = \"UILabel\"; text = \"Preferred Codec\"; ObjectID = \"3Hh-2q-gas\";",
"extractionState" : "extracted_with_value",
@@ -1100,49 +1070,49 @@
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "旧版"
"value" : "传统模式"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "舊版"
"value" : "傳統模式"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "舊版"
"value" : "傳統模式"
}
}
}
},
"CC6-pu-Uoh.segmentTitles[1]" : {
"comment" : "Class = \"UISegmentedControl\"; CC6-pu-Uoh.segmentTitles[1] = \"Queue\"; ObjectID = \"CC6-pu-Uoh\";",
"comment" : "Class = \"UISegmentedControl\"; CC6-pu-Uoh.segmentTitles[1] = \"Queue Buffering\"; ObjectID = \"CC6-pu-Uoh\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Queue"
"value" : "Queue Buffering"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "佇列"
"state" : "needs_review",
"value" : "队列缓冲"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "佇列"
"state" : "needs_review",
"value" : "佇列緩衝"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "佇列"
"state" : "needs_review",
"value" : "佇列緩衝"
}
}
}
@@ -1250,19 +1220,19 @@
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "帧缓冲模式"
"value" : "帧步进控制"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "幀緩衝模式"
"value" : "影格步調"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "幀緩衝模式"
"value" : "影格步調"
}
}
}