From 36ba82dd16b129e6897eb194e57f2628bfb30db5 Mon Sep 17 00:00:00 2001 From: True Zhuanjia Date: Thu, 11 Jul 2024 23:32:17 +0800 Subject: [PATCH] go back to stream view button on ipad --- Limelight/Base.lproj/iPad.storyboard | 19 +++++++- .../ViewControllers/MainFrameViewController.m | 1 + .../ViewControllers/SWRevealViewController.m | 4 +- .../ViewControllers/SettingsViewController.h | 1 + .../ViewControllers/SettingsViewController.m | 7 ++- Limelight/mul.lproj/iPad.xcstrings | 48 +++++++++++++++++++ 6 files changed, 75 insertions(+), 5 deletions(-) diff --git a/Limelight/Base.lproj/iPad.storyboard b/Limelight/Base.lproj/iPad.storyboard index fab37407..f0513077 100644 --- a/Limelight/Base.lproj/iPad.storyboard +++ b/Limelight/Base.lproj/iPad.storyboard @@ -439,7 +439,7 @@ ICAgICAgICAgICAgICA + @@ -464,6 +478,7 @@ ICAgICAgICAgICAgICA + diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index 48feb881..12195b00 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -916,6 +916,7 @@ static NSMutableSet* hostList; [settingsViewController.hdrSelector setEnabled:!self.settingsExpandedInStreamView]; [settingsViewController.framePacingSelector setEnabled:!self.settingsExpandedInStreamView]; [settingsViewController.btMouseSelector setEnabled:!self.settingsExpandedInStreamView]; + [settingsViewController.goBackToStreamViewButton setEnabled:self.settingsExpandedInStreamView]; if (position == FrontViewPositionLeft) { [settingsViewController saveSettings]; diff --git a/Limelight/ViewControllers/SWRevealViewController.m b/Limelight/ViewControllers/SWRevealViewController.m index bf648031..11af464a 100755 --- a/Limelight/ViewControllers/SWRevealViewController.m +++ b/Limelight/ViewControllers/SWRevealViewController.m @@ -626,10 +626,10 @@ const int FrontViewPositionNone = 0xff; _frontViewPosition = FrontViewPositionLeft; _rearViewPosition = FrontViewPositionLeft; _rightViewPosition = FrontViewPositionLeft; - _rearViewRevealWidth = 510.0f; + _rearViewRevealWidth = 492.0f; _rearViewRevealOverdraw = 60.0f; _rearViewRevealDisplacement = 40.0f; - _rightViewRevealWidth = 510.0f; + _rightViewRevealWidth = 492.0f; _rightViewRevealOverdraw = 60.0f; _rightViewRevealDisplacement = 40.0f; _bounceBackOnOverdraw = YES; diff --git a/Limelight/ViewControllers/SettingsViewController.h b/Limelight/ViewControllers/SettingsViewController.h index cbfe44f5..4c8a94cb 100644 --- a/Limelight/ViewControllers/SettingsViewController.h +++ b/Limelight/ViewControllers/SettingsViewController.h @@ -45,6 +45,7 @@ @property (strong, nonatomic) IBOutlet UILabel *touchPointerVelocityFactorUILabel; @property (strong, nonatomic) IBOutlet UISlider *mousePointerVelocityFactorSlider; @property (strong, nonatomic) IBOutlet UILabel *mousePointerVelocityFactorUILabel; +@property (strong, nonatomic) IBOutlet UIButton *goBackToStreamViewButton; @property (strong, nonatomic) LayoutOnScreenControlsViewController *layoutOnScreenControlsVC; @property (nonatomic, strong) MainFrameViewController *mainFrameViewController; @property (nonatomic, strong) CustomEdgeSwipeGestureRecognizer *exitSwipeRecognizer; diff --git a/Limelight/ViewControllers/SettingsViewController.m b/Limelight/ViewControllers/SettingsViewController.m index 974ff4aa..29f5e056 100644 --- a/Limelight/ViewControllers/SettingsViewController.m +++ b/Limelight/ViewControllers/SettingsViewController.m @@ -222,7 +222,12 @@ BOOL isCustomResolution(CGSize res) { [[NSNotificationCenter defaultCenter] postNotificationName:@"SessionDisconnectedBySettingsViewNotification" object:self]; } +- (IBAction)goBackToStreamViewButtonTapped:(id)sender { + [self simulateSettingsButtonPress]; +} + +/* - (void)addExitButtonOnTop{ UIButton *exitButton = [UIButton buttonWithType:UIButtonTypeSystem]; [exitButton setTitle:@"Exit" forState:UIControlStateNormal]; @@ -234,7 +239,7 @@ BOOL isCustomResolution(CGSize res) { [exitButton addTarget:self action:@selector(exitButtonTapped) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:exitButton]; exitButton.frame = CGRectMake(0, 20, 200, 50); // Adjust Y and height as needed -} +}*/ - (void)viewDidLoad { diff --git a/Limelight/mul.lproj/iPad.xcstrings b/Limelight/mul.lproj/iPad.xcstrings index dd3ed72c..95d3f216 100644 --- a/Limelight/mul.lproj/iPad.xcstrings +++ b/Limelight/mul.lproj/iPad.xcstrings @@ -1837,6 +1837,54 @@ } } }, + "uSS-ev-IFe.configuration.title" : { + "comment" : "Class = \"UIButton\"; configuration.title = \"Go Back to Stream View\"; ObjectID = \"uSS-ev-IFe\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Go Back to Stream View" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "返回串流" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "返回串流" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "返回串流" + } + } + } + }, + "uSS-ev-IFe.normalTitle" : { + "comment" : "Class = \"UIButton\"; normalTitle = \"Button\"; ObjectID = \"uSS-ev-IFe\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Button" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "返回串流" + } + } + } + }, "WDY-9o-6Hb.segmentTitles[0]" : { "comment" : "Class = \"UISegmentedControl\"; WDY-9o-6Hb.segmentTitles[0] = \"No\"; ObjectID = \"WDY-9o-6Hb\";", "extractionState" : "extracted_with_value",