Various fixes

This commit is contained in:
Ilya Laktyushin 2025-01-02 22:53:02 +04:00
parent d9aada69aa
commit 4b3f7041cc
2 changed files with 5 additions and 3 deletions

View File

@ -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:

View File

@ -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)