mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-25 17:43:18 +00:00
Fix title inset
This commit is contained in:
parent
c74548e76b
commit
8880417f23
@ -1280,6 +1280,11 @@ final class VideoChatScreenComponent: Component {
|
|||||||
|
|
||||||
let canManageCall = self.callState?.canManageCall ?? false
|
let canManageCall = self.callState?.canManageCall ?? false
|
||||||
|
|
||||||
|
var maxTitleWidth: CGFloat = availableSize.width - sideInset * 2.0 - navigationButtonAreaWidth * 2.0 - 4.0 * 2.0
|
||||||
|
if isTwoColumnLayout {
|
||||||
|
maxTitleWidth -= 88.0
|
||||||
|
}
|
||||||
|
|
||||||
let titleSize = self.title.update(
|
let titleSize = self.title.update(
|
||||||
transition: transition,
|
transition: transition,
|
||||||
component: AnyComponent(VideoChatTitleComponent(
|
component: AnyComponent(VideoChatTitleComponent(
|
||||||
@ -1322,7 +1327,7 @@ final class VideoChatScreenComponent: Component {
|
|||||||
} : nil
|
} : nil
|
||||||
)),
|
)),
|
||||||
environment: {},
|
environment: {},
|
||||||
containerSize: CGSize(width: availableSize.width - sideInset * 2.0 - navigationButtonAreaWidth * 2.0 - 4.0 * 2.0, height: 100.0)
|
containerSize: CGSize(width: maxTitleWidth, height: 100.0)
|
||||||
)
|
)
|
||||||
let titleFrame = CGRect(origin: CGPoint(x: floor((availableSize.width - titleSize.width) * 0.5), y: topInset + floor((navigationBarHeight - titleSize.height) * 0.5)), size: titleSize)
|
let titleFrame = CGRect(origin: CGPoint(x: floor((availableSize.width - titleSize.width) * 0.5), y: topInset + floor((navigationBarHeight - titleSize.height) * 0.5)), size: titleSize)
|
||||||
if let titleView = self.title.view {
|
if let titleView = self.title.view {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user