diff --git a/VoidLink/Base.lproj/iPad.storyboard b/VoidLink/Base.lproj/iPad.storyboard index 331f2fb5..e5a293e7 100644 --- a/VoidLink/Base.lproj/iPad.storyboard +++ b/VoidLink/Base.lproj/iPad.storyboard @@ -133,6 +133,7 @@ + @@ -152,6 +153,7 @@ + @@ -178,9 +180,10 @@ + - + + + + - - + + - + + + + @@ -221,7 +233,7 @@ - + + + + @@ -265,6 +280,7 @@ + @@ -289,6 +305,7 @@ + @@ -312,12 +329,12 @@ + - + - + + + @@ -358,6 +378,7 @@ + @@ -380,12 +401,12 @@ + - + - + + + - - - + + - + + + + - - - + + - + + + + @@ -461,12 +489,12 @@ + - + - + @@ -506,11 +535,11 @@ + - + - + + + @@ -591,6 +623,7 @@ + @@ -615,25 +648,28 @@ + - - - + + - + + + + @@ -655,6 +691,7 @@ + @@ -677,6 +714,7 @@ + @@ -698,6 +736,7 @@ + @@ -719,6 +758,7 @@ + @@ -740,6 +780,7 @@ + @@ -766,7 +807,7 @@ - + @@ -795,6 +836,7 @@ + @@ -822,6 +864,7 @@ + @@ -843,6 +886,7 @@ + @@ -867,6 +911,7 @@ + @@ -891,6 +936,7 @@ + @@ -916,6 +962,7 @@ + @@ -935,6 +982,7 @@ + @@ -959,44 +1007,49 @@ + - - - + + - + + + + - - - + + - + + + + @@ -1019,61 +1072,68 @@ + - - - + + - + + + + - - - + + - + + + + - - - + + - + + + + @@ -1898,7 +1958,7 @@ - + @@ -1907,13 +1967,13 @@ - + - + - + diff --git a/VoidLink/Base.lproj/iPhone.storyboard b/VoidLink/Base.lproj/iPhone.storyboard index e81e3e08..dd035362 100644 --- a/VoidLink/Base.lproj/iPhone.storyboard +++ b/VoidLink/Base.lproj/iPhone.storyboard @@ -867,6 +867,7 @@ + @@ -885,6 +886,7 @@ + @@ -910,10 +912,11 @@ + - + - - - - + @@ -944,12 +944,18 @@ + + + @@ -978,6 +984,9 @@ + + + @@ -1005,6 +1014,7 @@ + @@ -1026,6 +1036,7 @@ + @@ -1046,6 +1057,7 @@ + @@ -1067,6 +1079,7 @@ + @@ -1089,6 +1102,7 @@ + @@ -1109,6 +1123,7 @@ + @@ -1136,7 +1151,7 @@ - + @@ -1165,6 +1180,7 @@ + @@ -1188,6 +1204,7 @@ + @@ -1212,6 +1229,7 @@ + @@ -1237,6 +1255,7 @@ + @@ -1256,6 +1275,7 @@ + @@ -1279,6 +1299,7 @@ + @@ -1303,6 +1324,7 @@ + @@ -1327,11 +1349,11 @@ + - + - + + + @@ -1372,6 +1397,7 @@ + @@ -1395,6 +1421,7 @@ + @@ -1418,12 +1445,12 @@ + - + - + + + - - - + + - + + + + - - - + + - + + + + - - - + + - + + + + - - - + + - + + + + @@ -1539,6 +1577,7 @@ + @@ -1563,12 +1602,12 @@ + - + - + + + @@ -1604,6 +1646,7 @@ + @@ -1628,25 +1671,28 @@ + - - - + + - + + + + @@ -1670,6 +1716,7 @@ + @@ -1712,7 +1759,7 @@ - + + @@ -1757,61 +1805,68 @@ + - - - + + - + + + + - - - + + - + + + + - - - + + - + + + + @@ -1934,19 +1989,19 @@ - + - + - + - + diff --git a/VoidLink/ViewControllers/SettingsViewController.m b/VoidLink/ViewControllers/SettingsViewController.m index 7c766698..5a74ec6c 100644 --- a/VoidLink/ViewControllers/SettingsViewController.m +++ b/VoidLink/ViewControllers/SettingsViewController.m @@ -1681,7 +1681,8 @@ BOOL isCustomResolution(int resolutionSelected) { [self.touchModeSelector addTarget:self action:@selector(touchModeChanged:) forControlEvents:UIControlEventValueChanged]; [self touchModeChanged:self.touchModeSelector]; - self.enableOswSwitchStack.hidden = !(currentSettings.touchMode.intValue == NativeTouch || currentSettings.touchMode.intValue == NativeTouchOnly); + self.enableOswSwitchStack.hidden = !(currentSettings.touchMode.intValue == NativeTouch || currentSettings.touchMode.intValue == NativeTouchOnly); // do not use setHidden to stack wrapped by a settingStack + [self.enableOswForNativeTouchSwitch setOn:currentSettings.touchMode.intValue != NativeTouchOnly]; [self.enableOswForNativeTouchSwitch addTarget:self action:@selector(enableOswForNativeTouchSwitchFlipped:) forControlEvents:UIControlEventValueChanged]; [self enableOswForNativeTouchSwitchFlipped:self.enableOswForNativeTouchSwitch]; @@ -1993,10 +1994,11 @@ BOOL isCustomResolution(int resolutionSelected) { // bool customOscEnabled = [self isOswEnabled] && [self.onScreenWidgetSelector selectedSegmentIndex] == OnScreenControlsLevelCustom; bool isNativeTouch = sender.selectedSegmentIndex == NativeTouch; //bool asyncNativeTouchEnabled = [self.asyncNativeTouchPrioritySelector selectedSegmentIndex] != AsyncNativeTouchOff; + if(self.enableOswSwitchStack.hidden != !isNativeTouch && isNativeTouch) [self highlightEmergingStack:self.enableOswSwitchStack]; self.enableOswSwitchStack.hidden = !isNativeTouch; + [self setHidden:!isNativeTouch forStack:self.pointerVelocityDividerStack]; - // [self.asyncNativeTouchPrioritySelector setEnabled:![self showOswSelector]]; // this selector stay aligned with oscSelector [self touchMoveEventIntervalSliderMoved:self.touchMoveEventIntervalSlider]; [self setHidden:!isNativeTouch forStack:self.pointerVelocityDividerStack]; [self setHidden:!isNativeTouch forStack:self.pointerVelocityFactorStack]; @@ -2018,32 +2020,44 @@ BOOL isCustomResolution(int resolutionSelected) { if(hidden){ stack.hidden = YES; [self->hiddenStacks addObject:stack]; - if(!settingsViewJustLoaded){ - if([stack.superview.superview isKindOfClass:[MenuSectionView class]]){ - MenuSectionView* section = (MenuSectionView* )stack.superview.superview; - [section updateViewForFoldState]; + if(!settingsViewJustLoaded){ // when settingsViewJustLoaded is true, height will be updated somewhere else + UIView* superView = stack.superview; + while(superView){ + if([superView isKindOfClass:[MenuSectionView class]]){ + MenuSectionView* section = (MenuSectionView* ) superView; + [section updateViewForFoldState]; + break; + } + superView = superView.superview; } } } else{ stack.hidden = NO; if(!settingsViewJustLoaded){ - if([stack.superview.superview isKindOfClass:[MenuSectionView class]]){ - MenuSectionView* section = (MenuSectionView* )stack.superview.superview; - [section updateViewForFoldState]; - } - if([hiddenStacks containsObject:stack]){ - [self highlightedBackgroundForView:stack animateWithDuration:0.2]; - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), - dispatch_get_main_queue(), ^{ - [self clearBackgroundColorForView:stack animateWithDuration:0.2]; - }); + UIView* superView = stack.superview; + while(superView){ + if([superView isKindOfClass:[MenuSectionView class]]){ + MenuSectionView* section = (MenuSectionView* ) superView; + [section updateViewForFoldState]; + break; + } + superView = superView.superview; } + if([hiddenStacks containsObject:stack]) [self highlightEmergingStack:stack]; } [hiddenStacks removeObject:stack]; } } +- (void)highlightEmergingStack:(UIStackView* )stack{ + [self highlightedBackgroundForView:stack animateWithDuration:0.2]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), + dispatch_get_main_queue(), ^{ + [self clearBackgroundColorForView:stack animateWithDuration:0.2]; + }); +} + - (void)redirectMicSwitchFlipped:(UISwitch* )sender{ if(sender.isOn) [self checkAndRequestMicPermission]; }