mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
UI fixes
This commit is contained in:
parent
a8dcdc3a74
commit
de06be0d9a
3 changed files with 5 additions and 4 deletions
|
|
@ -6,6 +6,7 @@ import Display
|
|||
|
||||
public enum QrCodeIcon {
|
||||
case none
|
||||
case cutout
|
||||
case proxy
|
||||
case custom(UIImage?)
|
||||
}
|
||||
|
|
@ -75,7 +76,7 @@ public func qrCode(string: String, color: UIColor, backgroundColor: UIColor? = n
|
|||
let clipSide = 81.0 * fittedRect.width / 267.0 * codeScale
|
||||
let clipRect = CGRect(x: fittedRect.midX - clipSide / 2.0, y: fittedRect.midY - clipSide / 2.0, width: clipSide, height: clipSide)
|
||||
switch icon {
|
||||
case .proxy, .custom:
|
||||
case .cutout, .proxy, .custom:
|
||||
c.fill(clipRect)
|
||||
default:
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue