Skip to content

Commit 6e414bd

Browse files
author
Isaac
committed
Merge commit '0b6c9946b23dc76592eff15e3e0a3b0169882de0'
2 parents a015249 + 0b6c994 commit 6e414bd

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

submodules/LegacyComponents/Sources/TGCameraController.m

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2743,10 +2743,16 @@ + (CGRect)_cameraPreviewFrameForScreenSize:(CGSize)screenSize mode:(PGCameraMode
27432743
{
27442744
case PGCameraModeVideo:
27452745
{
2746-
if (widescreenWidth == 926.0f)
2746+
if (widescreenWidth == 956.0f)
2747+
return CGRectMake(0, 82, screenSize.width, screenSize.height - 82 - 83);
2748+
else if (widescreenWidth == 932.0f)
2749+
return CGRectMake(0, 82, screenSize.width, screenSize.height - 82 - 83);
2750+
else if (widescreenWidth == 926.0f)
27472751
return CGRectMake(0, 82, screenSize.width, screenSize.height - 82 - 83);
27482752
else if (widescreenWidth == 896.0f)
27492753
return CGRectMake(0, 77, screenSize.width, screenSize.height - 77 - 83);
2754+
else if (widescreenWidth == 874.0f)
2755+
return CGRectMake(0, 77, screenSize.width, screenSize.height - 77 - 83);
27502756
else if (widescreenWidth == 812.0f)
27512757
return CGRectMake(0, 77, screenSize.width, screenSize.height - 77 - 68);
27522758
else
@@ -2770,13 +2776,17 @@ + (CGRect)_cameraPreviewFrameForScreenSize:(CGSize)screenSize mode:(PGCameraMode
27702776

27712777
default:
27722778
{
2773-
if (widescreenWidth == 932.0f)
2779+
if (widescreenWidth == 956.0f)
2780+
return CGRectMake(0, 136, screenSize.width, screenSize.height - 136 - 234);
2781+
else if (widescreenWidth == 932.0f)
27742782
return CGRectMake(0, 136, screenSize.width, screenSize.height - 136 - 223);
27752783
else if (widescreenWidth == 926.0f)
27762784
return CGRectMake(0, 121, screenSize.width, screenSize.height - 121 - 234);
27772785
else if (widescreenWidth == 896.0f)
27782786
return CGRectMake(0, 121, screenSize.width, screenSize.height - 121 - 223);
2779-
if (widescreenWidth == 852.0f)
2787+
else if (widescreenWidth == 874.0f)
2788+
return CGRectMake(0, 121, screenSize.width, screenSize.height - 135 - 202);
2789+
else if (widescreenWidth == 852.0f)
27802790
return CGRectMake(0, 136, screenSize.width, screenSize.height - 136 - 192);
27812791
else if (widescreenWidth == 844.0f)
27822792
return CGRectMake(0, 77, screenSize.width, screenSize.height - 77 - 191);

submodules/LegacyComponents/Sources/TGCameraMainPhoneView.m

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,18 @@ - (instancetype)initWithFrame:(CGRect)frame avatar:(bool)avatar videoModeByDefau
113113
CGFloat shutterButtonWidth = 66.0f;
114114
CGSize screenSize = TGScreenSize();
115115
CGFloat widescreenWidth = MAX(screenSize.width, screenSize.height);
116-
if (widescreenWidth == 932.0f)
116+
if (widescreenWidth == 956.0f)
117+
{
118+
_topPanelOffset = 48.0f;
119+
_topPanelHeight = 48.0f;
120+
_bottomPanelOffset = 83.0f;
121+
_bottomPanelHeight = 140.0f;
122+
_modeControlOffset = -1.0f;
123+
_modeControlHeight = 66.0f;
124+
_counterOffset = 7.0f;
125+
shutterButtonWidth = 72.0f;
126+
}
127+
else if (widescreenWidth == 932.0f)
117128
{
118129
_topPanelOffset = 48.0f;
119130
_topPanelHeight = 48.0f;

submodules/TelegramUI/Components/Gifts/GiftItemComponent/Sources/GiftItemComponent.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@ public final class GiftItemComponent: Component {
3131
return [
3232
UIColor(rgb: 0x522124),
3333
UIColor(rgb: 0x653634)
34-
3534
]
3635
} else {
3736
return [
3837
UIColor(rgb: 0xed1c26),
3938
UIColor(rgb: 0xff5c55)
40-
4139
]
4240
}
4341
case .blue:
@@ -359,7 +357,7 @@ public final class GiftItemComponent: Component {
359357
}
360358
ribbonTextView.bounds = CGRect(origin: .zero, size: ribbonTextSize)
361359

362-
if self.ribbon.image == nil || themeUpdated {
360+
if self.ribbon.image == nil || themeUpdated || previousComponent?.ribbon?.color != component.ribbon?.color {
363361
self.ribbon.image = generateGradientTintedImage(image: UIImage(bundleImageName: "Premium/GiftRibbon"), colors: ribbon.color.colors(theme: component.theme), direction: .diagonal)
364362
}
365363
if let ribbonImage = self.ribbon.image {

0 commit comments

Comments
 (0)