mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Initial invite requests implementation
This commit is contained in:
@@ -16,10 +16,13 @@ private enum Constants {
|
||||
|
||||
private class LeftAlignedIconButton: UIButton {
|
||||
override func titleRect(forContentRect contentRect: CGRect) -> CGRect {
|
||||
let titleRect = super.titleRect(forContentRect: contentRect)
|
||||
var titleRect = super.titleRect(forContentRect: contentRect)
|
||||
let imageSize = currentImage?.size ?? .zero
|
||||
let availableWidth = contentRect.width - imageEdgeInsets.right - imageSize.width - titleRect.width
|
||||
return titleRect.offsetBy(dx: round(availableWidth / 2) - imageEdgeInsets.left, dy: 0)
|
||||
titleRect.origin.x = imageSize.width + 2.0
|
||||
//
|
||||
// let availableWidth = contentRect.width - imageEdgeInsets.right - imageSize.width - titleRect.width
|
||||
// return titleRect.offsetBy(dx: round(availableWidth / 2) - imageEdgeInsets.left, dy: 0)
|
||||
return titleRect
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user