mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-08 05:30:47 +00:00
Various fixes
This commit is contained in:
parent
d9aada69aa
commit
4b3f7041cc
@ -220,7 +220,7 @@ public final class GiftItemComponent: Component {
|
||||
iconSize = CGSize(width: 88.0, height: 88.0)
|
||||
cornerRadius = 10.0
|
||||
case .profile:
|
||||
size = CGSize(width: availableSize.width, height: min(117 - UIScreenPixel, availableSize.width))
|
||||
size = availableSize
|
||||
iconSize = CGSize(width: 88.0, height: 88.0)
|
||||
cornerRadius = 10.0
|
||||
case .thumbnail:
|
||||
|
@ -130,10 +130,12 @@ public final class PeerInfoGiftsPaneNode: ASDisplayNode, PeerInfoPaneNode, UIScr
|
||||
let optionSpacing: CGFloat = 10.0
|
||||
let sideInset = params.sideInset + 16.0
|
||||
|
||||
let itemsInRow = max(1, min(starsProducts.count, 3))
|
||||
let defaultItemsInRow = 3
|
||||
let itemsInRow = max(1, min(starsProducts.count, defaultItemsInRow))
|
||||
let defaultOptionWidth = (params.size.width - sideInset * 2.0 - optionSpacing * CGFloat(defaultItemsInRow - 1)) / CGFloat(defaultItemsInRow)
|
||||
let optionWidth = (params.size.width - sideInset * 2.0 - optionSpacing * CGFloat(itemsInRow - 1)) / CGFloat(itemsInRow)
|
||||
|
||||
let starsOptionSize = CGSize(width: optionWidth, height: optionWidth)
|
||||
let starsOptionSize = CGSize(width: optionWidth, height: defaultOptionWidth)
|
||||
|
||||
let visibleBounds = self.scrollNode.bounds.insetBy(dx: 0.0, dy: -10.0)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user