mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Location view fixes
This commit is contained in:
parent
0e3b3429dc
commit
e9cc2c686f
@ -239,7 +239,10 @@ final class LocationActionListItemNode: ListViewItemNode {
|
|||||||
|
|
||||||
let titleSpacing: CGFloat = 1.0
|
let titleSpacing: CGFloat = 1.0
|
||||||
let bottomInset: CGFloat = hasSeparator ? 0.0 : 4.0
|
let bottomInset: CGFloat = hasSeparator ? 0.0 : 4.0
|
||||||
let contentSize = CGSize(width: params.width, height: verticalInset * 2.0 + titleLayout.size.height + titleSpacing + subtitleLayout.size.height + bottomInset)
|
var contentSize = CGSize(width: params.width, height: verticalInset * 2.0 + titleLayout.size.height + titleSpacing + subtitleLayout.size.height + bottomInset)
|
||||||
|
if hasSeparator {
|
||||||
|
contentSize.height = max(52.0, contentSize.height)
|
||||||
|
}
|
||||||
let nodeLayout = ListViewItemNodeLayout(contentSize: contentSize, insets: UIEdgeInsets())
|
let nodeLayout = ListViewItemNodeLayout(contentSize: contentSize, insets: UIEdgeInsets())
|
||||||
|
|
||||||
return (nodeLayout, { [weak self] in
|
return (nodeLayout, { [weak self] in
|
||||||
|
@ -180,7 +180,7 @@ final class LocationMapHeaderNode: ASDisplayNode {
|
|||||||
func updateLayout(layout: ContainerViewLayout, navigationBarHeight: CGFloat, topPadding: CGFloat, offset: CGFloat, size: CGSize, transition: ContainedViewLayoutTransition) {
|
func updateLayout(layout: ContainerViewLayout, navigationBarHeight: CGFloat, topPadding: CGFloat, offset: CGFloat, size: CGSize, transition: ContainedViewLayoutTransition) {
|
||||||
self.validLayout = (layout, navigationBarHeight, topPadding, offset, size)
|
self.validLayout = (layout, navigationBarHeight, topPadding, offset, size)
|
||||||
|
|
||||||
let mapHeight: CGFloat = floor(layout.size.height * 1.5)
|
let mapHeight: CGFloat = floor(layout.size.height * 1.3)
|
||||||
let mapFrame = CGRect(x: 0.0, y: floorToScreenPixels((size.height - mapHeight + navigationBarHeight) / 2.0) + offset, width: size.width, height: mapHeight)
|
let mapFrame = CGRect(x: 0.0, y: floorToScreenPixels((size.height - mapHeight + navigationBarHeight) / 2.0) + offset, width: size.width, height: mapHeight)
|
||||||
transition.updateFrame(node: self.mapNode, frame: mapFrame)
|
transition.updateFrame(node: self.mapNode, frame: mapFrame)
|
||||||
self.mapNode.updateLayout(size: mapFrame.size)
|
self.mapNode.updateLayout(size: mapFrame.size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user