mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various Fixes
This commit is contained in:
parent
7d3cf6031e
commit
9413744c4a
@ -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];
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user