mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Chat wallpaper fixes
This commit is contained in:
parent
35c8092a90
commit
15ecbd1136
@ -864,6 +864,7 @@ final class WallpaperBackgroundNodeImpl: ASDisplayNode, WallpaperBackgroundNode
|
||||
self.bakedBackgroundView.isHidden = true
|
||||
|
||||
self.dimLayer = SimpleLayer()
|
||||
self.dimLayer.opacity = 0.0
|
||||
self.dimLayer.backgroundColor = UIColor.black.cgColor
|
||||
|
||||
super.init()
|
||||
|
@ -258,7 +258,7 @@ public func wallpaperImage(account: Account, accountManager: AccountManager<Tele
|
||||
if let thumbnailImage = thumbnailImage {
|
||||
let thumbnailSize = CGSize(width: thumbnailImage.width, height: thumbnailImage.height)
|
||||
|
||||
let initialThumbnailContextFittingSize = fittedSize.fitted(CGSize(width: 90.0, height: 90.0))
|
||||
let initialThumbnailContextFittingSize = fittedSize.fitted(CGSize(width: 240.0, height: 240.0))
|
||||
|
||||
let thumbnailContextSize = thumbnailSize.aspectFitted(initialThumbnailContextFittingSize)
|
||||
guard let thumbnailContext = DrawingContext(size: thumbnailContextSize, scale: 1.0) else {
|
||||
@ -268,6 +268,7 @@ public func wallpaperImage(account: Account, accountManager: AccountManager<Tele
|
||||
c.draw(thumbnailImage, in: CGRect(origin: CGPoint(), size: thumbnailContextSize))
|
||||
}
|
||||
telegramFastBlurMore(Int32(thumbnailContextSize.width), Int32(thumbnailContextSize.height), Int32(thumbnailContext.bytesPerRow), thumbnailContext.bytes)
|
||||
telegramFastBlurMore(Int32(thumbnailContextSize.width), Int32(thumbnailContextSize.height), Int32(thumbnailContext.bytesPerRow), thumbnailContext.bytes)
|
||||
|
||||
var thumbnailContextFittingSize = CGSize(width: floor(arguments.drawingSize.width * 0.5), height: floor(arguments.drawingSize.width * 0.5))
|
||||
if thumbnailContextFittingSize.width < 150.0 || thumbnailContextFittingSize.height < 150.0 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user