mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
UI fixes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user