diff --git a/submodules/LegacyComponents/Sources/TGCameraMainPhoneView.m b/submodules/LegacyComponents/Sources/TGCameraMainPhoneView.m index 96d0789e7b..bc6b5a3b9b 100644 --- a/submodules/LegacyComponents/Sources/TGCameraMainPhoneView.m +++ b/submodules/LegacyComponents/Sources/TGCameraMainPhoneView.m @@ -674,6 +674,7 @@ _flashControl.transform = CGAffineTransformMakeRotation(TGRotationForInterfaceOrientation(orientation)); _zoomModeView.interfaceOrientation = orientation; _timecodeView.interfaceOrientation = orientation; + _zoomWheelView.interfaceOrientation = orientation; } completion:^(__unused BOOL finished) { if (_modeControl.cameraMode == PGCameraModeVideo) @@ -703,6 +704,8 @@ _flipButton.transform = CGAffineTransformMakeRotation(TGRotationForInterfaceOrientation(orientation)); _flashControl.transform = CGAffineTransformMakeRotation(TGRotationForInterfaceOrientation(orientation)); _zoomModeView.interfaceOrientation = orientation; + _timecodeView.interfaceOrientation = orientation; + _zoomWheelView.interfaceOrientation = orientation; [self _layoutTopPanelSubviewsForInterfaceOrientation:orientation]; } diff --git a/submodules/LegacyComponents/Sources/TGCameraZoomView.m b/submodules/LegacyComponents/Sources/TGCameraZoomView.m index 58cd0a96ee..ec7b59a5a1 100644 --- a/submodules/LegacyComponents/Sources/TGCameraZoomView.m +++ b/submodules/LegacyComponents/Sources/TGCameraZoomView.m @@ -828,20 +828,32 @@ [_feedbackGenerator selectionChanged]; } - _valueLabel.frame = CGRectMake(TGScreenPixelFloor((self.frame.size.width - _valueLabel.frame.size.width) / 2.0), 30.0, _valueLabel.frame.size.width, _valueLabel.frame.size.height); + CGRect valueLabelFrame = CGRectMake(TGScreenPixelFloor((self.frame.size.width - _valueLabel.frame.size.width) / 2.0), 30.0, _valueLabel.frame.size.width, _valueLabel.frame.size.height); + _valueLabel.bounds = CGRectMake(0, 0, valueLabelFrame.size.width, valueLabelFrame.size.height); + _valueLabel.center = CGPointMake(valueLabelFrame.origin.x + valueLabelFrame.size.width / 2.0, valueLabelFrame.origin.y + valueLabelFrame.size.height / 2.0); } - (void)setInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { _interfaceOrientation = interfaceOrientation; + CGFloat delta = 0.0f; switch (interfaceOrientation) { case UIInterfaceOrientationLandscapeLeft: + delta = -90.0f; break; case UIInterfaceOrientationLandscapeRight: + delta = 90.0f; break; + case UIInterfaceOrientationPortraitUpsideDown: + delta = 180.0f; default: break; } + _valueLabel.transform = CGAffineTransformMakeRotation(TGDegreesToRadians(delta)); + _05Label.transform = CGAffineTransformMakeRotation(TGDegreesToRadians(-19.6 + delta)); + _1Label.transform = CGAffineTransformMakeRotation(TGDegreesToRadians(delta)); + _2Label.transform = CGAffineTransformMakeRotation(TGDegreesToRadians(19.6 + delta)); + _8Label.transform = CGAffineTransformMakeRotation(TGDegreesToRadians(58.93 + delta)); } - (void)setHidden:(BOOL)hidden