mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Cloud themes support
This commit is contained in:
@@ -48,7 +48,7 @@ public struct PresentationResourcesRootController {
|
||||
|
||||
public static func navigationCallIcon(_ theme: PresentationTheme) -> UIImage? {
|
||||
return theme.image(PresentationResourceKey.navigationCallIcon.rawValue, { theme in
|
||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Info/CallButton"), color: theme.rootController.navigationBar.accentTextColor)
|
||||
return generateTintedImage(image: UIImage(bundleImageName: "Call List/CallIcon"), color: theme.rootController.navigationBar.accentTextColor)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -66,14 +66,15 @@ public struct PresentationResourcesRootController {
|
||||
|
||||
public static func navigationCompactSearchIcon(_ theme: PresentationTheme) -> UIImage? {
|
||||
return theme.image(PresentationResourceKey.navigationCompactSearchIcon.rawValue, { theme in
|
||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat List/SearchIcon"), color: theme.rootController.navigationBar.accentTextColor).flatMap({ image in
|
||||
let factor: CGFloat = 0.8
|
||||
let size = CGSize(width: floor(image.size.width * factor), height: floor(image.size.height * factor))
|
||||
return generateImage(size, contextGenerator: { size, context in
|
||||
context.clear(CGRect(origin: CGPoint(), size: size))
|
||||
context.draw(image.cgImage!, in: CGRect(origin: CGPoint(), size: size))
|
||||
})
|
||||
})
|
||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat List/SearchIcon"), color: theme.rootController.navigationBar.accentTextColor)
|
||||
// return generateTintedImage(image: UIImage(bundleImageName: "Chat List/SearchIcon"), color: theme.rootController.navigationBar.accentTextColor).flatMap({ image in
|
||||
// let factor: CGFloat = 0.8
|
||||
// let size = CGSize(width: floor(image.size.width * factor), height: floor(image.size.height * factor))
|
||||
// return generateImage(size, contextGenerator: { size, context in
|
||||
// context.clear(CGRect(origin: CGPoint(), size: size))
|
||||
// context.draw(image.cgImage!, in: CGRect(origin: CGPoint(), size: size))
|
||||
// })
|
||||
// })
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user