From 924be77a8772b4ae01a6f5078ea0e98658847b38 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Tue, 15 Dec 2020 04:54:31 +0400 Subject: [PATCH] Fix camera UI on new iPhones --- .../Sources/TGCameraMainPhoneView.m | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/submodules/LegacyComponents/Sources/TGCameraMainPhoneView.m b/submodules/LegacyComponents/Sources/TGCameraMainPhoneView.m index 5f0233b629..a8cdfcb45a 100644 --- a/submodules/LegacyComponents/Sources/TGCameraMainPhoneView.m +++ b/submodules/LegacyComponents/Sources/TGCameraMainPhoneView.m @@ -110,7 +110,18 @@ CGFloat shutterButtonWidth = 66.0f; CGSize screenSize = TGScreenSize(); CGFloat widescreenWidth = MAX(screenSize.width, screenSize.height); - if (widescreenWidth == 896.0f) + if (widescreenWidth == 926.0f) + { + _topPanelOffset = 77.0f; + _topPanelHeight = 77.0f; + _bottomPanelOffset = 94.0f; + _bottomPanelHeight = 155.0f; + _modeControlOffset = 6.0f; + _modeControlHeight = 66.0f; + _counterOffset = 7.0f; + shutterButtonWidth = 72.0f; + } + else if (widescreenWidth == 896.0f) { _topPanelOffset = 33.0f; _topPanelHeight = 44.0f; @@ -121,6 +132,17 @@ _counterOffset = 7.0f; shutterButtonWidth = 72.0f; } + if (widescreenWidth == 844.0f) + { + _topPanelOffset = 33.0f; + _topPanelHeight = 44.0f; + _bottomPanelOffset = 63.0f; + _bottomPanelHeight = 123.0f; + _modeControlOffset = 3.0f; + _modeControlHeight = 40.0f; + _counterOffset = 7.0f; + shutterButtonWidth = 70.0f; + } else if (widescreenWidth == 812.0f) { _topPanelOffset = 33.0f;