mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Fix text field insets in editor
This commit is contained in:
parent
f9060c696b
commit
b53be04a2e
@ -2224,7 +2224,7 @@ final class ItemStack<ChildEnvironment: Equatable>: CombinedComponent {
|
||||
let remainingWidth = context.availableSize.width - itemsWidth - context.component.padding * 2.0
|
||||
spacing = remainingWidth / CGFloat(group.count - 1)
|
||||
|
||||
var nextX: CGFloat = context.component.padding
|
||||
var nextX: CGFloat = floorToScreenPixels((context.availableSize.width - itemsWidth) / 2.0) //context.component.padding
|
||||
for i in group {
|
||||
let child = updatedChildren[i]
|
||||
let frame = CGRect(origin: CGPoint(x: nextX, y: size.height + floorToScreenPixels((groupHeight - child.size.height) / 2.0)), size: child.size)
|
||||
@ -2280,30 +2280,30 @@ final class StoryStickersContentView: UIView, EmojiCustomContentView {
|
||||
}
|
||||
})
|
||||
)
|
||||
),
|
||||
AnyComponentWithIdentity(
|
||||
id: "audio",
|
||||
component: AnyComponent(
|
||||
CameraButton(
|
||||
content: AnyComponentWithIdentity(
|
||||
id: "audio",
|
||||
component: AnyComponent(
|
||||
CustomContentButton(
|
||||
theme: theme,
|
||||
title: "AUDIO",
|
||||
iconName: "Media Editor/Audio",
|
||||
useOpaqueTheme: useOpaqueTheme,
|
||||
tintContainerView: self.tintContainerView
|
||||
)
|
||||
)
|
||||
),
|
||||
action: { [weak self] in
|
||||
if let self {
|
||||
self.audioAction()
|
||||
}
|
||||
})
|
||||
)
|
||||
)
|
||||
// AnyComponentWithIdentity(
|
||||
// id: "audio",
|
||||
// component: AnyComponent(
|
||||
// CameraButton(
|
||||
// content: AnyComponentWithIdentity(
|
||||
// id: "audio",
|
||||
// component: AnyComponent(
|
||||
// CustomContentButton(
|
||||
// theme: theme,
|
||||
// title: "AUDIO",
|
||||
// iconName: "Media Editor/Audio",
|
||||
// useOpaqueTheme: useOpaqueTheme,
|
||||
// tintContainerView: self.tintContainerView
|
||||
// )
|
||||
// )
|
||||
// ),
|
||||
// action: { [weak self] in
|
||||
// if let self {
|
||||
// self.audioAction()
|
||||
// }
|
||||
// })
|
||||
// )
|
||||
// )
|
||||
],
|
||||
padding: 18.0,
|
||||
minSpacing: 8.0
|
||||
|
@ -736,7 +736,7 @@ public final class MessageInputPanelComponent: Component {
|
||||
var fieldBackgroundFrame: CGRect
|
||||
if hasMediaRecording {
|
||||
fieldBackgroundFrame = CGRect(origin: CGPoint(x: mediaInsets.left, y: insets.top), size: CGSize(width: availableSize.width - mediaInsets.left - mediaInsets.right, height: textFieldSize.height))
|
||||
} else if isEditing {
|
||||
} else if isEditing || component.style == .editor {
|
||||
fieldBackgroundFrame = fieldFrame
|
||||
} else {
|
||||
if component.forwardAction != nil && component.likeAction != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user