Emoji improvements

This commit is contained in:
Ali 2022-07-24 03:15:19 +02:00
parent 3e8fe53f47
commit 3347f0514e
49 changed files with 569 additions and 1324 deletions

View File

@ -127,9 +127,13 @@ public final class LottieAnimationComponent: Component {
updateColors = true
}
var animateSize = true
var updateComponent = true
if self.component?.animation != component.animation {
if let animationView = self.animationView {
if case .animateTransitionFromPrevious = component.animation.mode, !animationView.isAnimationPlaying, !self.didPlayToCompletion {
updateComponent = false
animationView.play { [weak self] _ in
self?.currentCompletion?()
}
@ -172,12 +176,15 @@ public final class LottieAnimationComponent: Component {
self.animationView = view
self.addSubview(view)
animateSize = false
updatePlayback = true
}
}
}
self.component = component
if updateComponent {
self.component = component
}
if updateColors, let animationView = self.animationView {
if let value = component.colors["__allcolors__"] {
@ -208,7 +215,7 @@ public final class LottieAnimationComponent: Component {
let animationFrame = CGRect(origin: CGPoint(x: floor((size.width - animationSize.width) / 2.0), y: floor((size.height - animationSize.height) / 2.0)), size: animationSize)
if animationView.frame != animationFrame {
if !transition.animation.isImmediate && !animationView.frame.isEmpty && animationView.frame.size != animationFrame.size {
if !transition.animation.isImmediate && animateSize && !animationView.frame.isEmpty && animationView.frame.size != animationFrame.size {
let previouosAnimationFrame = animationView.frame
if let snapshotView = animationView.snapshotView(afterScreenUpdates: false) {

View File

@ -65,7 +65,7 @@ public final class PagerComponentChildEnvironment: Equatable {
public final class PagerComponentPanelEnvironment<TopPanelEnvironment>: Equatable {
public let contentOffset: CGFloat
public let contentTopPanels: [AnyComponentWithIdentity<TopPanelEnvironment>]
public let contentIcons: [AnyComponentWithIdentity<Empty>]
public let contentIcons: [PagerComponentContentIcon]
public let contentAccessoryLeftButtons: [AnyComponentWithIdentity<Empty>]
public let contentAccessoryRightButtons: [AnyComponentWithIdentity<Empty>]
public let activeContentId: AnyHashable?
@ -76,7 +76,7 @@ public final class PagerComponentPanelEnvironment<TopPanelEnvironment>: Equatabl
init(
contentOffset: CGFloat,
contentTopPanels: [AnyComponentWithIdentity<TopPanelEnvironment>],
contentIcons: [AnyComponentWithIdentity<Empty>],
contentIcons: [PagerComponentContentIcon],
contentAccessoryLeftButtons: [AnyComponentWithIdentity<Empty>],
contentAccessoryRightButtons: [AnyComponentWithIdentity<Empty>],
activeContentId: AnyHashable?,
@ -141,13 +141,36 @@ public enum PagerComponentPanelHideBehavior {
case hide
}
public final class PagerComponentContentIcon: Equatable {
public let id: AnyHashable
public let imageName: String
public init(id: AnyHashable, imageName: String) {
self.id = id
self.imageName = imageName
}
public static func ==(lhs: PagerComponentContentIcon, rhs: PagerComponentContentIcon) -> Bool {
if lhs === rhs {
return true
}
if lhs.id != rhs.id {
return false
}
if lhs.imageName != rhs.imageName {
return false
}
return true
}
}
public final class PagerComponent<ChildEnvironmentType: Equatable, TopPanelEnvironment: Equatable>: Component {
public typealias EnvironmentType = ChildEnvironmentType
public let contentInsets: UIEdgeInsets
public let contents: [AnyComponentWithIdentity<(ChildEnvironmentType, PagerComponentChildEnvironment)>]
public let contentTopPanels: [AnyComponentWithIdentity<TopPanelEnvironment>]
public let contentIcons: [AnyComponentWithIdentity<Empty>]
public let contentIcons: [PagerComponentContentIcon]
public let contentAccessoryLeftButtons:[AnyComponentWithIdentity<Empty>]
public let contentAccessoryRightButtons:[AnyComponentWithIdentity<Empty>]
public let defaultId: AnyHashable?
@ -163,7 +186,7 @@ public final class PagerComponent<ChildEnvironmentType: Equatable, TopPanelEnvir
contentInsets: UIEdgeInsets,
contents: [AnyComponentWithIdentity<(ChildEnvironmentType, PagerComponentChildEnvironment)>],
contentTopPanels: [AnyComponentWithIdentity<TopPanelEnvironment>],
contentIcons: [AnyComponentWithIdentity<Empty>],
contentIcons: [PagerComponentContentIcon],
contentAccessoryLeftButtons: [AnyComponentWithIdentity<Empty>],
contentAccessoryRightButtons: [AnyComponentWithIdentity<Empty>],
defaultId: AnyHashable?,
@ -565,7 +588,7 @@ public final class PagerComponent<ChildEnvironmentType: Equatable, TopPanelEnvir
}
}
let backgroundFrame = CGRect(origin: CGPoint(x: 0.0, y: effectiveTopPanelHeight), size: CGSize(width: availableSize.width, height: availableSize.height - effectiveTopPanelHeight - contentInsets.bottom + bottomPanelOffset))
let backgroundFrame = CGRect(origin: CGPoint(x: 0.0, y: effectiveTopPanelHeight), size: CGSize(width: availableSize.width, height: availableSize.height - effectiveTopPanelHeight + bottomPanelOffset))
if let contentBackground = component.contentBackground {
let contentBackgroundView: ComponentHostView<Empty>
var contentBackgroundTransition = panelStateTransition

View File

@ -387,7 +387,7 @@ public func assertNotOnMainThread(_ file: String = #file, line: Int = #line) {
}
public extension UIImage {
func precomposed() -> UIImage {
func precomposed() -> UIImage {
UIGraphicsBeginImageContextWithOptions(self.size, false, self.scale)
self.draw(at: CGPoint())
let result = UIGraphicsGetImageFromCurrentImageContext()!

View File

@ -608,13 +608,16 @@ public func makeDefaultDarkPresentationTheme(extendingThemeReference: Presentati
panelSeparatorColor: UIColor(rgb: 0x3d3d40),
panelIconColor: UIColor(rgb: 0x808080),
panelHighlightedIconBackgroundColor: UIColor(rgb: 0x262628),
panelHighlightedIconColor: UIColor(rgb: 0x808080).mixedWith(UIColor(rgb: 0xffffff), alpha: 0.35),
panelContentVibrantOverlayColor: UIColor(rgb: 0x808080),
stickersBackgroundColor: UIColor(rgb: 0x000000),
stickersSectionTextColor: UIColor(rgb: 0x7b7b7b),
stickersSearchBackgroundColor: UIColor(rgb: 0x1c1c1d),
stickersSearchPlaceholderColor: UIColor(rgb: 0x8d8e93),
stickersSearchPrimaryColor: UIColor(rgb: 0xffffff),
stickersSearchControlColor: UIColor(rgb: 0x8d8e93),
gifsBackgroundColor: UIColor(rgb: 0x000000)
gifsBackgroundColor: UIColor(rgb: 0x000000),
backgroundColor: UIColor(rgb: 0x000000, alpha: 0.75)
)
let inputButtonPanel = PresentationThemeInputButtonPanel(

View File

@ -440,12 +440,15 @@ public func customizeDefaultDarkTintedPresentationTheme(theme: PresentationTheme
panelSeparatorColor: mainBackgroundColor,
panelIconColor: mainSecondaryTextColor?.withAlphaComponent(0.5),
panelHighlightedIconBackgroundColor: inputBackgroundColor,
panelHighlightedIconColor: mainSecondaryTextColor?.withAlphaComponent(0.5).mixedWith(chat.inputPanel.primaryTextColor, alpha: 0.35),
panelContentVibrantOverlayColor: mainSecondaryTextColor?.withAlphaComponent(0.5),
stickersBackgroundColor: additionalBackgroundColor,
stickersSectionTextColor: mainSecondaryTextColor?.withAlphaComponent(0.5),
stickersSearchBackgroundColor: accentColor?.withMultiplied(hue: 1.009, saturation: 0.621, brightness: 0.15),
stickersSearchPlaceholderColor: accentColor?.withMultiplied(hue: 0.99, saturation: 0.243, brightness: 0.59),
stickersSearchControlColor: accentColor?.withMultiplied(hue: 0.99, saturation: 0.243, brightness: 0.59),
gifsBackgroundColor: additionalBackgroundColor
gifsBackgroundColor: additionalBackgroundColor,
backgroundColor: additionalBackgroundColor?.withMultipliedAlpha(0.75)
),
inputButtonPanel: chat.inputButtonPanel.withUpdated(
panelSeparatorColor: mainBackgroundColor,
@ -837,13 +840,16 @@ public func makeDefaultDarkTintedPresentationTheme(extendingThemeReference: Pres
panelSeparatorColor: mainBackgroundColor,
panelIconColor: mainSecondaryTextColor.withAlphaComponent(0.5),
panelHighlightedIconBackgroundColor: inputBackgroundColor,
panelHighlightedIconColor: mainSecondaryTextColor.withAlphaComponent(0.5).mixedWith(inputPanel.primaryTextColor, alpha: 0.35),
panelContentVibrantOverlayColor: mainSecondaryTextColor.withAlphaComponent(0.5),
stickersBackgroundColor: additionalBackgroundColor,
stickersSectionTextColor: mainSecondaryTextColor.withAlphaComponent(0.5),
stickersSearchBackgroundColor: accentColor.withMultiplied(hue: 1.009, saturation: 0.621, brightness: 0.15),
stickersSearchPlaceholderColor: accentColor.withMultiplied(hue: 0.99, saturation: 0.243, brightness: 0.59),
stickersSearchPrimaryColor: .white,
stickersSearchControlColor: accentColor.withMultiplied(hue: 0.99, saturation: 0.243, brightness: 0.59),
gifsBackgroundColor: additionalBackgroundColor
gifsBackgroundColor: additionalBackgroundColor,
backgroundColor: additionalBackgroundColor.withMultipliedAlpha(0.75)
)
let inputButtonPanel = PresentationThemeInputButtonPanel(

View File

@ -862,13 +862,16 @@ public func makeDefaultDayPresentationTheme(extendingThemeReference: Presentatio
panelSeparatorColor: UIColor(rgb: 0xbec2c6),
panelIconColor: UIColor(rgb: 0x858e99),
panelHighlightedIconBackgroundColor: UIColor(rgb: 0x858e99, alpha: 0.2),
panelHighlightedIconColor: UIColor(rgb: 0x4D5561),
panelContentVibrantOverlayColor: day ? UIColor(white: 0.0, alpha: 0.3) : UIColor(white: 0.6, alpha: 0.65),
stickersBackgroundColor: UIColor(rgb: 0xe8ebf0),
stickersSectionTextColor: UIColor(rgb: 0x9099a2),
stickersSearchBackgroundColor: UIColor(rgb: 0xd9dbe1),
stickersSearchPlaceholderColor: UIColor(rgb: 0x8e8e93),
stickersSearchPrimaryColor: UIColor(rgb: 0x000000),
stickersSearchControlColor: UIColor(rgb: 0x8e8e93),
gifsBackgroundColor: UIColor(rgb: 0xffffff)
gifsBackgroundColor: UIColor(rgb: 0xffffff),
backgroundColor: UIColor(rgb: 0xffffff, alpha: 0.7)
)
let inputButtonPanel = PresentationThemeInputButtonPanel(

View File

@ -1142,6 +1142,8 @@ public final class PresentationThemeInputMediaPanel {
public let panelSeparatorColor: UIColor
public let panelIconColor: UIColor
public let panelHighlightedIconBackgroundColor: UIColor
public let panelHighlightedIconColor: UIColor
public let panelContentVibrantOverlayColor: UIColor
public let stickersBackgroundColor: UIColor
public let stickersSectionTextColor: UIColor
public let stickersSearchBackgroundColor: UIColor
@ -1149,11 +1151,14 @@ public final class PresentationThemeInputMediaPanel {
public let stickersSearchPrimaryColor: UIColor
public let stickersSearchControlColor: UIColor
public let gifsBackgroundColor: UIColor
public let backgroundColor: UIColor
public init(panelSeparatorColor: UIColor, panelIconColor: UIColor, panelHighlightedIconBackgroundColor: UIColor, stickersBackgroundColor: UIColor, stickersSectionTextColor: UIColor, stickersSearchBackgroundColor: UIColor, stickersSearchPlaceholderColor: UIColor, stickersSearchPrimaryColor: UIColor, stickersSearchControlColor: UIColor, gifsBackgroundColor: UIColor) {
public init(panelSeparatorColor: UIColor, panelIconColor: UIColor, panelHighlightedIconBackgroundColor: UIColor, panelHighlightedIconColor: UIColor, panelContentVibrantOverlayColor: UIColor, stickersBackgroundColor: UIColor, stickersSectionTextColor: UIColor, stickersSearchBackgroundColor: UIColor, stickersSearchPlaceholderColor: UIColor, stickersSearchPrimaryColor: UIColor, stickersSearchControlColor: UIColor, gifsBackgroundColor: UIColor, backgroundColor: UIColor) {
self.panelSeparatorColor = panelSeparatorColor
self.panelIconColor = panelIconColor
self.panelHighlightedIconBackgroundColor = panelHighlightedIconBackgroundColor
self.panelHighlightedIconColor = panelHighlightedIconColor
self.panelContentVibrantOverlayColor = panelContentVibrantOverlayColor
self.stickersBackgroundColor = stickersBackgroundColor
self.stickersSectionTextColor = stickersSectionTextColor
self.stickersSearchBackgroundColor = stickersSearchBackgroundColor
@ -1161,10 +1166,11 @@ public final class PresentationThemeInputMediaPanel {
self.stickersSearchPrimaryColor = stickersSearchPrimaryColor
self.stickersSearchControlColor = stickersSearchControlColor
self.gifsBackgroundColor = gifsBackgroundColor
self.backgroundColor = backgroundColor
}
public func withUpdated(panelSeparatorColor: UIColor? = nil, panelIconColor: UIColor? = nil, panelHighlightedIconBackgroundColor: UIColor? = nil, stickersBackgroundColor: UIColor? = nil, stickersSectionTextColor: UIColor? = nil, stickersSearchBackgroundColor: UIColor? = nil, stickersSearchPlaceholderColor: UIColor? = nil, stickersSearchPrimaryColor: UIColor? = nil, stickersSearchControlColor: UIColor? = nil, gifsBackgroundColor: UIColor? = nil) -> PresentationThemeInputMediaPanel {
return PresentationThemeInputMediaPanel(panelSeparatorColor: panelSeparatorColor ?? self.panelSeparatorColor, panelIconColor: panelIconColor ?? self.panelIconColor, panelHighlightedIconBackgroundColor: panelHighlightedIconBackgroundColor ?? self.panelHighlightedIconBackgroundColor, stickersBackgroundColor: stickersBackgroundColor ?? self.stickersBackgroundColor, stickersSectionTextColor: stickersSectionTextColor ?? self.stickersSectionTextColor, stickersSearchBackgroundColor: stickersSearchBackgroundColor ?? self.stickersSearchBackgroundColor, stickersSearchPlaceholderColor: stickersSearchPlaceholderColor ?? self.stickersSearchPlaceholderColor, stickersSearchPrimaryColor: stickersSearchPrimaryColor ?? self.stickersSearchPrimaryColor, stickersSearchControlColor: stickersSearchControlColor ?? self.stickersSearchControlColor, gifsBackgroundColor: gifsBackgroundColor ?? self.gifsBackgroundColor)
public func withUpdated(panelSeparatorColor: UIColor? = nil, panelIconColor: UIColor? = nil, panelHighlightedIconBackgroundColor: UIColor? = nil, panelHighlightedIconColor: UIColor? = nil, panelContentVibrantOverlayColor: UIColor? = nil, stickersBackgroundColor: UIColor? = nil, stickersSectionTextColor: UIColor? = nil, stickersSearchBackgroundColor: UIColor? = nil, stickersSearchPlaceholderColor: UIColor? = nil, stickersSearchPrimaryColor: UIColor? = nil, stickersSearchControlColor: UIColor? = nil, gifsBackgroundColor: UIColor? = nil, backgroundColor: UIColor? = nil) -> PresentationThemeInputMediaPanel {
return PresentationThemeInputMediaPanel(panelSeparatorColor: panelSeparatorColor ?? self.panelSeparatorColor, panelIconColor: panelIconColor ?? self.panelIconColor, panelHighlightedIconBackgroundColor: panelHighlightedIconBackgroundColor ?? self.panelHighlightedIconBackgroundColor, panelHighlightedIconColor: panelHighlightedIconColor ?? self.panelHighlightedIconColor, panelContentVibrantOverlayColor: panelContentVibrantOverlayColor ?? self.panelContentVibrantOverlayColor, stickersBackgroundColor: stickersBackgroundColor ?? self.stickersBackgroundColor, stickersSectionTextColor: stickersSectionTextColor ?? self.stickersSectionTextColor, stickersSearchBackgroundColor: stickersSearchBackgroundColor ?? self.stickersSearchBackgroundColor, stickersSearchPlaceholderColor: stickersSearchPlaceholderColor ?? self.stickersSearchPlaceholderColor, stickersSearchPrimaryColor: stickersSearchPrimaryColor ?? self.stickersSearchPrimaryColor, stickersSearchControlColor: stickersSearchControlColor ?? self.stickersSearchControlColor, gifsBackgroundColor: gifsBackgroundColor ?? self.gifsBackgroundColor, backgroundColor: backgroundColor ?? self.backgroundColor)
}
}

View File

@ -1605,6 +1605,8 @@ extension PresentationThemeInputMediaPanel: Codable {
case panelSeparator
case panelIcon
case panelHighlightedIconBg
case panelHighlightedIcon
case panelContentVibrantOverlay
case stickersBg
case stickersSectionText
case stickersSearchBg
@ -1612,20 +1614,43 @@ extension PresentationThemeInputMediaPanel: Codable {
case stickersSearchPrimary
case stickersSearchControl
case gifsBg
case bg
}
public convenience init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
let backgroundColor: UIColor
if let value = try? decodeColor(values, .bg) {
backgroundColor = value
} else {
backgroundColor = try decodeColor(values, .gifsBg).withMultipliedAlpha(0.75)
}
let panelHighlightedIconColor: UIColor
if let value = try? decodeColor(values, .panelHighlightedIcon) {
panelHighlightedIconColor = value
} else if let value = try? decodeColor(values, .panelHighlightedIcon, fallbackKey: "chat.inputPanel.inputText") {
let defaultColor = try decodeColor(values, .panelIcon)
panelHighlightedIconColor = defaultColor.mixedWith(value, alpha: 0.35)
} else {
panelHighlightedIconColor = try decodeColor(values, .panelIcon)
}
let codingPath = decoder.codingPath.map { $0.stringValue }.joined(separator: ".")
self.init(panelSeparatorColor: try decodeColor(values, .panelSeparator),
panelIconColor: try decodeColor(values, .panelIcon),
panelHighlightedIconBackgroundColor: try decodeColor(values, .panelHighlightedIconBg),
panelHighlightedIconColor: panelHighlightedIconColor,
panelContentVibrantOverlayColor: try decodeColor(values, .panelContentVibrantOverlay, fallbackKey: "\(codingPath).panelIcon"),
stickersBackgroundColor: try decodeColor(values, .stickersBg),
stickersSectionTextColor: try decodeColor(values, .stickersSectionText),
stickersSearchBackgroundColor: try decodeColor(values, .stickersSearchBg),
stickersSearchPlaceholderColor: try decodeColor(values, .stickersSearchPlaceholder),
stickersSearchPrimaryColor: try decodeColor(values, .stickersSearchPrimary),
stickersSearchControlColor: try decodeColor(values, .stickersSearchControl),
gifsBackgroundColor: try decodeColor(values, .gifsBg))
gifsBackgroundColor: try decodeColor(values, .gifsBg), backgroundColor: backgroundColor)
}
public func encode(to encoder: Encoder) throws {
@ -1633,6 +1658,8 @@ extension PresentationThemeInputMediaPanel: Codable {
try encodeColor(&values, self.panelSeparatorColor, .panelSeparator)
try encodeColor(&values, self.panelIconColor, .panelIcon)
try encodeColor(&values, self.panelHighlightedIconBackgroundColor, .panelHighlightedIconBg)
try encodeColor(&values, self.panelHighlightedIconColor, .panelHighlightedIcon)
try encodeColor(&values, self.panelContentVibrantOverlayColor, .panelContentVibrantOverlay)
try encodeColor(&values, self.stickersBackgroundColor, .stickersBg)
try encodeColor(&values, self.stickersSectionTextColor, .stickersSectionText)
try encodeColor(&values, self.stickersSearchBackgroundColor, .stickersSearchBg)
@ -1640,6 +1667,7 @@ extension PresentationThemeInputMediaPanel: Codable {
try encodeColor(&values, self.stickersSearchPrimaryColor, .stickersSearchPrimary)
try encodeColor(&values, self.stickersSearchControlColor, .stickersSearchControl)
try encodeColor(&values, self.gifsBackgroundColor, .gifsBg)
try encodeColor(&values, self.backgroundColor, .bg)
}
}

View File

@ -264,7 +264,7 @@ private final class AnimationCacheItemWriterInternal {
}
let width = roundUp(proposedWidth, multiple: 16)
let height = roundUp(proposedWidth, multiple: 16)
let height = roundUp(proposedHeight, multiple: 16)
var isFirstFrame = false
@ -466,7 +466,7 @@ private final class AnimationCacheItemWriterImpl: AnimationCacheItemWriter {
}
let width = roundUp(proposedWidth, multiple: 16)
let height = roundUp(proposedWidth, multiple: 16)
let height = roundUp(proposedHeight, multiple: 16)
var isFirstFrame = false
@ -1336,7 +1336,7 @@ public final class AnimationCacheImpl: AnimationCache {
self.queue = queue
let fetchQueueCount: Int
if ProcessInfo.processInfo.activeProcessorCount > 2 {
if ProcessInfo.processInfo.processorCount > 2 {
fetchQueueCount = 3
} else {
fetchQueueCount = 2

View File

@ -599,11 +599,10 @@ private final class GroupHeaderLayer: UIView {
color = theme.chat.inputPanel.primaryTextColor
needsTintText = false
} else {
//color = theme.chat.inputMediaPanel.stickersSectionTextColor.withMultipliedAlpha(0.1)
color = UIColor(white: 1.0, alpha: 0.0)
color = theme.chat.inputMediaPanel.panelContentVibrantOverlayColor
needsTintText = true
}
let subtitleColor = theme.chat.inputMediaPanel.stickersSectionTextColor.withMultipliedAlpha(0.1)
let subtitleColor = theme.chat.inputMediaPanel.panelContentVibrantOverlayColor
let titleHorizontalOffset: CGFloat
if isPremiumLocked {
@ -712,7 +711,12 @@ private final class GroupHeaderLayer: UIView {
self.currentTextLayout = (title, color, textConstrainedWidth, textSize)
}
let textFrame = CGRect(origin: CGPoint(x: titleHorizontalOffset, y: textOffsetY), size: textSize)
let textFrame: CGRect
if (layoutType == .compact && hasClear) || subtitle != nil {
textFrame = CGRect(origin: CGPoint(x: titleHorizontalOffset, y: textOffsetY), size: textSize)
} else {
textFrame = CGRect(origin: CGPoint(x: floor((constrainedSize.width - textSize.width) / 2.0), y: textOffsetY), size: textSize)
}
self.textLayer.frame = textFrame
self.tintTextLayer.frame = textFrame
self.tintTextLayer.isHidden = !needsTintText
@ -808,7 +812,7 @@ private final class GroupHeaderLayer: UIView {
}
var clearSize = clearIconLayer.bounds.size
if updateImage, let image = PresentationResourcesChat.chatInputMediaPanelGridDismissImage(theme, color: theme.chat.inputMediaPanel.stickersSectionTextColor.withMultipliedAlpha(0.1)) {
if updateImage, let image = PresentationResourcesChat.chatInputMediaPanelGridDismissImage(theme, color: theme.chat.inputMediaPanel.panelContentVibrantOverlayColor) {
clearSize = image.size
clearIconLayer.contents = image.cgImage
}
@ -816,12 +820,8 @@ private final class GroupHeaderLayer: UIView {
tintClearIconLayer.contents = image.cgImage
}
switch layoutType {
case .compact:
clearIconLayer.frame = CGRect(origin: CGPoint(x: titleHorizontalOffset + textSize.width + 4.0, y: floorToScreenPixels((textSize.height - clearSize.height) / 2.0)), size: clearSize)
case .detailed:
clearIconLayer.frame = CGRect(origin: CGPoint(x: constrainedSize.width - clearSize.width, y: floorToScreenPixels((textSize.height - clearSize.height) / 2.0)), size: clearSize)
}
clearIconLayer.frame = CGRect(origin: CGPoint(x: constrainedSize.width - clearSize.width, y: floorToScreenPixels((textSize.height - clearSize.height) / 2.0)), size: clearSize)
tintClearIconLayer.frame = clearIconLayer.frame
clearWidth = 4.0 + clearSize.width
} else {
@ -836,10 +836,9 @@ private final class GroupHeaderLayer: UIView {
}
var size: CGSize
switch layoutType {
case .compact:
if layoutType == .compact && hasClear {
size = CGSize(width: titleHorizontalOffset + textSize.width + clearWidth, height: constrainedSize.height)
case .detailed:
} else {
size = CGSize(width: constrainedSize.width, height: constrainedSize.height)
}
@ -885,7 +884,7 @@ private final class GroupHeaderLayer: UIView {
self.separatorLayer = separatorLayer
self.layer.addSublayer(separatorLayer)
}
separatorLayer.backgroundColor = theme.chat.inputMediaPanel.stickersSectionTextColor.withAlphaComponent(0.15).cgColor
separatorLayer.backgroundColor = theme.chat.inputMediaPanel.panelContentVibrantOverlayColor.cgColor
separatorLayer.frame = CGRect(origin: CGPoint(x: 0.0, y: 0.0), size: CGSize(width: size.width, height: UIScreenPixel))
let tintSeparatorLayer: SimpleLayer
@ -1190,7 +1189,7 @@ private final class GroupExpandActionButton: UIButton {
let textConstrainedWidth: CGFloat = 100.0
let color = theme.list.itemCheckColors.foregroundColor
self.backgroundLayer.backgroundColor = theme.chat.inputMediaPanel.stickersSectionTextColor.withMultipliedAlpha(0.1).cgColor
self.backgroundLayer.backgroundColor = theme.chat.inputMediaPanel.panelContentVibrantOverlayColor.cgColor
self.tintContainerLayer.backgroundColor = UIColor.white.cgColor
let textSize: CGSize
@ -1254,6 +1253,7 @@ public final class EmojiPagerContentComponent: Component {
public let performItemAction: (AnyHashable, Item, UIView, CGRect, CALayer) -> Void
public let deleteBackwards: () -> Void
public let openStickerSettings: () -> Void
public let openFeatured: () -> Void
public let addGroupAction: (AnyHashable, Bool) -> Void
public let clearGroup: (AnyHashable) -> Void
public let pushController: (ViewController) -> Void
@ -1267,6 +1267,7 @@ public final class EmojiPagerContentComponent: Component {
performItemAction: @escaping (AnyHashable, Item, UIView, CGRect, CALayer) -> Void,
deleteBackwards: @escaping () -> Void,
openStickerSettings: @escaping () -> Void,
openFeatured: @escaping () -> Void,
addGroupAction: @escaping (AnyHashable, Bool) -> Void,
clearGroup: @escaping (AnyHashable) -> Void,
pushController: @escaping (ViewController) -> Void,
@ -1279,6 +1280,7 @@ public final class EmojiPagerContentComponent: Component {
self.performItemAction = performItemAction
self.deleteBackwards = deleteBackwards
self.openStickerSettings = openStickerSettings
self.openFeatured = openFeatured
self.addGroupAction = addGroupAction
self.clearGroup = clearGroup
self.pushController = pushController
@ -1544,17 +1546,25 @@ public final class EmojiPagerContentComponent: Component {
switch layoutType {
case .compact:
minItemsPerRow = 8
self.nativeItemSize = 36.0
self.nativeItemSize = 40.0
self.playbackItemSize = 48.0
self.verticalSpacing = 9.0
minSpacing = 9.0
if width >= 420.0 {
self.itemInsets = UIEdgeInsets(top: containerInsets.top, left: containerInsets.left + 5.0, bottom: containerInsets.bottom, right: containerInsets.right + 5.0)
self.headerInsets = UIEdgeInsets(top: containerInsets.top, left: containerInsets.left + 5.0, bottom: containerInsets.bottom, right: containerInsets.right + 5.0)
minSpacing = 2.0
} else {
self.itemInsets = UIEdgeInsets(top: containerInsets.top, left: containerInsets.left + 7.0, bottom: containerInsets.bottom, right: containerInsets.right + 7.0)
self.headerInsets = UIEdgeInsets(top: containerInsets.top, left: containerInsets.left + 7.0, bottom: containerInsets.bottom, right: containerInsets.right + 7.0)
minSpacing = 9.0
}
self.itemDefaultHeaderHeight = 24.0
self.itemFeaturedHeaderHeight = self.itemDefaultHeaderHeight
self.itemInsets = UIEdgeInsets(top: containerInsets.top, left: containerInsets.left + 12.0, bottom: containerInsets.bottom, right: containerInsets.right + 12.0)
self.headerInsets = UIEdgeInsets(top: containerInsets.top, left: containerInsets.left + 12.0, bottom: containerInsets.bottom, right: containerInsets.right + 12.0)
case .detailed:
minItemsPerRow = 5
self.nativeItemSize = 71.0
self.nativeItemSize = 70.0
self.playbackItemSize = 96.0
self.verticalSpacing = 2.0
minSpacing = 12.0
@ -1571,9 +1581,13 @@ public final class EmojiPagerContentComponent: Component {
self.itemsPerRow = max(minItemsPerRow, Int((itemHorizontalSpace + minSpacing) / (self.nativeItemSize + minSpacing)))
self.visibleItemSize = floor((itemHorizontalSpace - CGFloat(self.itemsPerRow - 1) * minSpacing) / CGFloat(self.itemsPerRow))
self.visibleItemSize = self.nativeItemSize
self.horizontalSpacing = floor((itemHorizontalSpace - self.visibleItemSize * CGFloat(self.itemsPerRow)) / CGFloat(self.itemsPerRow - 1))
self.horizontalSpacing = floorToScreenPixels((itemHorizontalSpace - self.visibleItemSize * CGFloat(self.itemsPerRow)) / CGFloat(self.itemsPerRow - 1))
let actualContentWidth = self.visibleItemSize * CGFloat(self.itemsPerRow) + self.horizontalSpacing * CGFloat(self.itemsPerRow - 1)
self.itemInsets.left = floorToScreenPixels((width - actualContentWidth) / 2.0)
self.itemInsets.right = self.itemInsets.left
var verticalGroupOrigin: CGFloat = self.itemInsets.top
self.itemGroupLayouts = []
@ -1837,7 +1851,7 @@ public final class EmojiPagerContentComponent: Component {
return
}
if file.isVideoEmoji {
if file.isVideoEmoji || file.isVideoSticker {
cacheVideoAnimation(path: result, width: Int(size.width), height: Int(size.height), writer: writer)
} else if file.isAnimatedSticker {
guard let data = try? Data(contentsOf: URL(fileURLWithPath: result)) else {
@ -2139,7 +2153,7 @@ public final class EmojiPagerContentComponent: Component {
override init(frame: CGRect) {
self.backgroundView = BlurredBackgroundView(color: nil)
if ProcessInfo.processInfo.activeProcessorCount > 2 {
if ProcessInfo.processInfo.processorCount > 2 {
self.shimmerHostView = PortalSourceView()
self.standaloneShimmerEffect = StandaloneShimmerEffect()
} else {
@ -2867,7 +2881,7 @@ public final class EmojiPagerContentComponent: Component {
let position = CGPoint(x: itemLayer.frame.midX, y: itemLayer.frame.midY)
let distance = CGPoint(x: localPoint.x - position.x, y: localPoint.y - position.y)
let distance2 = distance.x * distance.x + distance.y * distance.y
if distance2 > pow(max(itemLayer.bounds.width, itemLayer.bounds.height) / 2.0, 2.0) {
if distance2 > pow(max(itemLayer.bounds.width, itemLayer.bounds.height), 2.0) {
continue
}
@ -3060,10 +3074,7 @@ public final class EmojiPagerContentComponent: Component {
actionButtonTitle = itemGroup.actionButtonTitle
}
var hasTopSeparator = false
if case .detailed = itemLayout.layoutType, itemGroup.isFeatured, groupItems.groupIndex != 0 {
hasTopSeparator = true
}
let hasTopSeparator = false
let groupHeaderSize = groupHeaderView.update(
context: component.context,
@ -3108,7 +3119,7 @@ public final class EmojiPagerContentComponent: Component {
self.scrollView.layer.insertSublayer(groupBorderLayer, at: 0)
self.mirrorContentScrollView.layer.addSublayer(groupBorderLayer.tintContainerLayer)
groupBorderLayer.strokeColor = theme.chat.inputMediaPanel.stickersSectionTextColor.withMultipliedAlpha(0.1).cgColor
groupBorderLayer.strokeColor = theme.chat.inputMediaPanel.panelContentVibrantOverlayColor.cgColor
groupBorderLayer.tintContainerLayer.strokeColor = UIColor.white.cgColor
groupBorderLayer.lineWidth = 1.6
groupBorderLayer.lineCap = .round
@ -3293,9 +3304,9 @@ public final class EmojiPagerContentComponent: Component {
} else {
itemDimensions = CGSize(width: 512.0, height: 512.0)
}
let itemNativeFitSize = itemDimensions.fitted(CGSize(width: itemLayout.nativeItemSize, height: itemLayout.nativeItemSize))
let itemVisibleFitSize = itemDimensions.fitted(CGSize(width: itemLayout.visibleItemSize, height: itemLayout.visibleItemSize))
let itemPlaybackSize = itemDimensions.fitted(CGSize(width: itemLayout.playbackItemSize, height: itemLayout.playbackItemSize))
let itemNativeFitSize = itemDimensions.aspectFitted(CGSize(width: itemLayout.nativeItemSize, height: itemLayout.nativeItemSize))
let itemVisibleFitSize = itemDimensions.aspectFitted(CGSize(width: itemLayout.visibleItemSize, height: itemLayout.visibleItemSize))
let itemPlaybackSize = itemDimensions.aspectFitted(CGSize(width: itemLayout.playbackItemSize, height: itemLayout.playbackItemSize))
var animateItemIn = false
var updateItemLayerPlaceholder = false
@ -3551,7 +3562,7 @@ public final class EmojiPagerContentComponent: Component {
vibrancyEffectView.contentView.addSubview(self.mirrorContentScrollView)
}
self.backgroundView.updateColor(color: theme.chat.inputMediaPanel.stickersBackgroundColor.withMultipliedAlpha(0.75), enableBlur: true, forceKeepBlur: false, transition: transition.containedViewLayoutTransition)
self.backgroundView.updateColor(color: theme.chat.inputMediaPanel.backgroundColor, enableBlur: true, forceKeepBlur: false, transition: transition.containedViewLayoutTransition)
transition.setFrame(view: self.backgroundView, frame: backgroundFrame)
self.backgroundView.update(size: backgroundFrame.size, transition: transition.containedViewLayoutTransition)

View File

@ -74,7 +74,7 @@ public final class EntityKeyboardComponent: Component {
}
public let theme: PresentationTheme
public let bottomInset: CGFloat
public let containerInsets: UIEdgeInsets
public let emojiContent: EmojiPagerContentComponent
public let stickerContent: EmojiPagerContentComponent?
public let gifContent: GifPagerContentComponent?
@ -93,7 +93,7 @@ public final class EntityKeyboardComponent: Component {
public init(
theme: PresentationTheme,
bottomInset: CGFloat,
containerInsets: UIEdgeInsets,
emojiContent: EmojiPagerContentComponent,
stickerContent: EmojiPagerContentComponent?,
gifContent: GifPagerContentComponent?,
@ -111,7 +111,7 @@ public final class EntityKeyboardComponent: Component {
isExpanded: Bool
) {
self.theme = theme
self.bottomInset = bottomInset
self.containerInsets = containerInsets
self.emojiContent = emojiContent
self.stickerContent = stickerContent
self.gifContent = gifContent
@ -133,7 +133,7 @@ public final class EntityKeyboardComponent: Component {
if lhs.theme !== rhs.theme {
return false
}
if lhs.bottomInset != rhs.bottomInset {
if lhs.containerInsets != rhs.containerInsets {
return false
}
if lhs.emojiContent != rhs.emojiContent {
@ -213,7 +213,7 @@ public final class EntityKeyboardComponent: Component {
var contents: [AnyComponentWithIdentity<(EntityKeyboardChildEnvironment, PagerComponentChildEnvironment)>] = []
var contentTopPanels: [AnyComponentWithIdentity<EntityKeyboardTopContainerPanelEnvironment>] = []
var contentIcons: [AnyComponentWithIdentity<Empty>] = []
var contentIcons: [PagerComponentContentIcon] = []
var contentAccessoryLeftButtons: [AnyComponentWithIdentity<Empty>] = []
var contentAccessoryRightButtons: [AnyComponentWithIdentity<Empty>] = []
@ -233,7 +233,7 @@ public final class EntityKeyboardComponent: Component {
id: "recent",
isReorderable: false,
content: AnyComponent(EntityKeyboardIconTopPanelComponent(
imageName: "Chat/Input/Media/RecentTabIcon",
icon: .recent,
theme: component.theme,
title: "Recent",
pressed: { [weak self] in
@ -246,7 +246,7 @@ public final class EntityKeyboardComponent: Component {
id: "trending",
isReorderable: false,
content: AnyComponent(EntityKeyboardIconTopPanelComponent(
imageName: "Chat/Input/Media/TrendingGifs",
icon: .trending,
theme: component.theme,
title: "Trending",
pressed: { [weak self] in
@ -290,11 +290,7 @@ public final class EntityKeyboardComponent: Component {
reorderItems: { _ in
}
))))
contentIcons.append(AnyComponentWithIdentity(id: "gifs", component: AnyComponent(BundleIconComponent(
name: "Chat/Input/Media/EntityInputGifsIcon",
tintColor: component.theme.chat.inputMediaPanel.panelIconColor,
maxSize: nil
))))
contentIcons.append(PagerComponentContentIcon(id: "gifs", imageName: "Chat/Input/Media/EntityInputGifsIcon"))
contentAccessoryLeftButtons.append(AnyComponentWithIdentity(id: "gifs", component: AnyComponent(Button(
content: AnyComponent(BundleIconComponent(
name: "Chat/Input/Media/EntityInputSearchIcon",
@ -310,12 +306,26 @@ public final class EntityKeyboardComponent: Component {
if let stickerContent = component.stickerContent {
var topStickerItems: [EntityKeyboardTopPanelComponent.Item] = []
//TODO:localize
topStickerItems.append(EntityKeyboardTopPanelComponent.Item(
id: "featuredTop",
isReorderable: false,
content: AnyComponent(EntityKeyboardIconTopPanelComponent(
icon: .featured,
theme: component.theme,
title: "Featured",
pressed: { [weak self] in
self?.component?.stickerContent?.inputInteractionHolder.inputInteraction?.openFeatured()
}
))
))
for itemGroup in stickerContent.itemGroups {
if let id = itemGroup.supergroupId.base as? String {
let iconMapping: [String: String] = [
"saved": "Chat/Input/Media/SavedStickersTabIcon",
"recent": "Chat/Input/Media/RecentTabIcon",
"premium": "Peer Info/PremiumIcon"
let iconMapping: [String: EntityKeyboardIconTopPanelComponent.Icon] = [
"saved": .saved,
"recent": .recent,
"premium": .premium
]
//TODO:localize
let titleMapping: [String: String] = [
@ -323,12 +333,12 @@ public final class EntityKeyboardComponent: Component {
"recent": "Recent",
"premium": "Premium"
]
if let iconName = iconMapping[id], let title = titleMapping[id] {
if let icon = iconMapping[id], let title = titleMapping[id] {
topStickerItems.append(EntityKeyboardTopPanelComponent.Item(
id: itemGroup.supergroupId,
isReorderable: false,
content: AnyComponent(EntityKeyboardIconTopPanelComponent(
imageName: iconName,
icon: icon,
theme: component.theme,
title: title,
pressed: { [weak self] in
@ -373,11 +383,7 @@ public final class EntityKeyboardComponent: Component {
strongSelf.reorderPacks(category: .stickers, items: items)
}
))))
contentIcons.append(AnyComponentWithIdentity(id: "stickers", component: AnyComponent(BundleIconComponent(
name: "Chat/Input/Media/EntityInputStickersIcon",
tintColor: component.theme.chat.inputMediaPanel.panelIconColor,
maxSize: nil
))))
contentIcons.append(PagerComponentContentIcon(id: "stickers", imageName: "Chat/Input/Media/EntityInputStickersIcon"))
contentAccessoryLeftButtons.append(AnyComponentWithIdentity(id: "stickers", component: AnyComponent(Button(
content: AnyComponent(BundleIconComponent(
name: "Chat/Input/Media/EntityInputSearchIcon",
@ -407,19 +413,19 @@ public final class EntityKeyboardComponent: Component {
if !itemGroup.items.isEmpty {
if let id = itemGroup.groupId.base as? String {
if id == "recent" {
let iconMapping: [String: String] = [
"recent": "Chat/Input/Media/RecentTabIcon",
let iconMapping: [String: EntityKeyboardIconTopPanelComponent.Icon] = [
"recent": .recent,
]
//TODO:localize
let titleMapping: [String: String] = [
"recent": "Recent",
]
if let iconName = iconMapping[id], let title = titleMapping[id] {
if let icon = iconMapping[id], let title = titleMapping[id] {
topEmojiItems.append(EntityKeyboardTopPanelComponent.Item(
id: itemGroup.supergroupId,
isReorderable: false,
content: AnyComponent(EntityKeyboardIconTopPanelComponent(
imageName: iconName,
icon: icon,
theme: component.theme,
title: title,
pressed: { [weak self] in
@ -479,11 +485,7 @@ public final class EntityKeyboardComponent: Component {
strongSelf.reorderPacks(category: .emoji, items: items)
}
))))
contentIcons.append(AnyComponentWithIdentity(id: "emoji", component: AnyComponent(BundleIconComponent(
name: "Chat/Input/Media/EntityInputEmojiIcon",
tintColor: component.theme.chat.inputMediaPanel.panelIconColor,
maxSize: nil
))))
contentIcons.append(PagerComponentContentIcon(id: "emoji", imageName: "Chat/Input/Media/EntityInputEmojiIcon"))
contentAccessoryLeftButtons.append(AnyComponentWithIdentity(id: "emoji", component: AnyComponent(Button(
content: AnyComponent(BundleIconComponent(
name: "Chat/Input/Media/EntityInputGlobeIcon",
@ -525,7 +527,7 @@ public final class EntityKeyboardComponent: Component {
let pagerSize = self.pagerView.update(
transition: transition,
component: AnyComponent(PagerComponent(
contentInsets: UIEdgeInsets(top: 0.0, left: 0.0, bottom: 0.0, right: 0.0),
contentInsets: component.containerInsets,
contents: contents,
contentTopPanels: contentTopPanels,
contentIcons: contentIcons,
@ -544,7 +546,7 @@ public final class EntityKeyboardComponent: Component {
externalTopPanelContainer: component.externalTopPanelContainer,
bottomPanel: AnyComponent(EntityKeyboardBottomPanelComponent(
theme: component.theme,
bottomInset: component.bottomInset,
containerInsets: component.containerInsets,
deleteBackwards: { [weak self] in
self?.component?.emojiContent.inputInteractionHolder.inputInteraction?.deleteBackwards()
AudioServicesPlaySystemSound(0x451)

View File

@ -10,19 +10,31 @@ import ComponentDisplayAdapters
import BundleIconComponent
private final class BottomPanelIconComponent: Component {
let content: AnyComponent<Empty>
let imageName: String
let isHighlighted: Bool
let theme: PresentationTheme
let action: () -> Void
init(
content: AnyComponent<Empty>,
imageName: String,
isHighlighted: Bool,
theme: PresentationTheme,
action: @escaping () -> Void
) {
self.content = content
self.imageName = imageName
self.isHighlighted = isHighlighted
self.theme = theme
self.action = action
}
static func ==(lhs: BottomPanelIconComponent, rhs: BottomPanelIconComponent) -> Bool {
if lhs.content != rhs.content {
if lhs.imageName != rhs.imageName {
return false
}
if lhs.isHighlighted != rhs.isHighlighted {
return false
}
if lhs.theme !== rhs.theme {
return false
}
@ -30,12 +42,12 @@ private final class BottomPanelIconComponent: Component {
}
final class View: UIView {
let contentView: ComponentHostView<Empty>
let contentView: UIImageView
var component: BottomPanelIconComponent?
override init(frame: CGRect) {
self.contentView = ComponentHostView<Empty>()
self.contentView = UIImageView()
self.contentView.isUserInteractionEnabled = false
super.init(frame: frame)
@ -55,16 +67,27 @@ private final class BottomPanelIconComponent: Component {
}
func update(component: BottomPanelIconComponent, availableSize: CGSize, state: EmptyComponentState, environment: Environment<Empty>, transition: Transition) -> CGSize {
if self.component?.imageName != component.imageName {
self.contentView.image = UIImage(bundleImageName: component.imageName)
}
self.component = component
let size = CGSize(width: 32.0, height: 32.0)
let size = CGSize(width: 28.0, height: 28.0)
let contentSize = self.contentView.update(
transition: transition,
component: component.content,
environment: {},
containerSize: size
)
let color = component.isHighlighted ? component.theme.chat.inputMediaPanel.panelHighlightedIconColor : component.theme.chat.inputMediaPanel.panelIconColor
if self.contentView.tintColor != color {
if !transition.animation.isImmediate {
UIView.animate(withDuration: 0.15, delay: 0.0, options: [], animations: {
self.contentView.tintColor = color
}, completion: nil)
} else {
self.contentView.tintColor = color
}
}
let contentSize = self.contentView.image?.size ?? size
transition.setFrame(view: self.contentView, frame: CGRect(origin: CGPoint(x: floor((size.width - contentSize.width) / 2.0), y: (size.height - contentSize.height) / 2.0), size: contentSize))
return size
@ -84,16 +107,16 @@ final class EntityKeyboardBottomPanelComponent: Component {
typealias EnvironmentType = PagerComponentPanelEnvironment<EntityKeyboardTopContainerPanelEnvironment>
let theme: PresentationTheme
let bottomInset: CGFloat
let containerInsets: UIEdgeInsets
let deleteBackwards: () -> Void
init(
theme: PresentationTheme,
bottomInset: CGFloat,
containerInsets: UIEdgeInsets,
deleteBackwards: @escaping () -> Void
) {
self.theme = theme
self.bottomInset = bottomInset
self.containerInsets = containerInsets
self.deleteBackwards = deleteBackwards
}
@ -101,7 +124,7 @@ final class EntityKeyboardBottomPanelComponent: Component {
if lhs.theme !== rhs.theme {
return false
}
if lhs.bottomInset != rhs.bottomInset {
if lhs.containerInsets != rhs.containerInsets {
return false
}
@ -160,8 +183,8 @@ final class EntityKeyboardBottomPanelComponent: Component {
self.highlightedIconBackgroundView.backgroundColor = component.theme.chat.inputMediaPanel.panelHighlightedIconBackgroundColor
}
let intrinsicHeight: CGFloat = 38.0
let height = intrinsicHeight + component.bottomInset
let intrinsicHeight: CGFloat = 34.0
let height = intrinsicHeight + component.containerInsets.bottom
let panelEnvironment = environment[PagerComponentPanelEnvironment<EntityKeyboardTopContainerPanelEnvironment>.self].value
let activeContentId = panelEnvironment.activeContentId
@ -194,7 +217,7 @@ final class EntityKeyboardBottomPanelComponent: Component {
environment: {},
containerSize: CGSize(width: .greatestFiniteMagnitude, height: intrinsicHeight)
)
leftAccessoryButtonTransition.setFrame(view: leftAccessoryButton.view, frame: CGRect(origin: CGPoint(x: 2.0, y: 2.0), size: leftAccessoryButtonSize))
leftAccessoryButtonTransition.setFrame(view: leftAccessoryButton.view, frame: CGRect(origin: CGPoint(x: component.containerInsets.left + 2.0, y: 2.0), size: leftAccessoryButtonSize))
} else {
self.leftAccessoryButton = nil
}
@ -246,7 +269,7 @@ final class EntityKeyboardBottomPanelComponent: Component {
environment: {},
containerSize: CGSize(width: .greatestFiniteMagnitude, height: intrinsicHeight)
)
rightAccessoryButtonTransition.setFrame(view: rightAccessoryButton.view, frame: CGRect(origin: CGPoint(x: availableSize.width - 2.0 - rightAccessoryButtonSize.width, y: 2.0), size: rightAccessoryButtonSize))
rightAccessoryButtonTransition.setFrame(view: rightAccessoryButton.view, frame: CGRect(origin: CGPoint(x: availableSize.width - component.containerInsets.right - 2.0 - rightAccessoryButtonSize.width, y: 2.0), size: rightAccessoryButtonSize))
} else {
self.rightAccessoryButton = nil
}
@ -296,13 +319,15 @@ final class EntityKeyboardBottomPanelComponent: Component {
let iconSize = iconView.update(
transition: iconTransition,
component: AnyComponent(BottomPanelIconComponent(
content: icon.component,
imageName: icon.imageName,
isHighlighted: icon.id == activeContentId,
theme: component.theme,
action: {
navigateToContentId(icon.id)
}
)),
environment: {},
containerSize: CGSize(width: 32.0, height: 32.0)
containerSize: CGSize(width: 28.0, height: 28.0)
)
iconInfos[icon.id] = (size: iconSize, transition: iconTransition)
@ -316,8 +341,8 @@ final class EntityKeyboardBottomPanelComponent: Component {
}
var nextIconOrigin = CGPoint(x: floor((availableSize.width - iconTotalSize.width) / 2.0), y: floor((intrinsicHeight - iconTotalSize.height) / 2.0))
if component.bottomInset > 0.0 {
nextIconOrigin.y += 2.0
if component.containerInsets.bottom > 0.0 {
nextIconOrigin.y += 3.0
}
if panelEnvironment.contentIcons.count > 1 {
@ -332,6 +357,14 @@ final class EntityKeyboardBottomPanelComponent: Component {
if let activeContentId = activeContentId, activeContentId == icon.id {
self.highlightedIconBackgroundView.isHidden = false
transition.setFrame(view: self.highlightedIconBackgroundView, frame: iconFrame)
let cornerRadius: CGFloat
if icon.id == AnyHashable("emoji") {
cornerRadius = min(iconFrame.width, iconFrame.height) / 2.0
} else {
cornerRadius = 10.0
}
transition.setCornerRadius(layer: self.highlightedIconBackgroundView.layer, cornerRadius: cornerRadius)
}
nextIconOrigin.x += iconInfo.size.width + iconSpacing

View File

@ -88,7 +88,7 @@ final class EntityKeyboardTopContainerPanelComponent: Component {
}
func update(component: EntityKeyboardTopContainerPanelComponent, availableSize: CGSize, state: EmptyComponentState, environment: Environment<EnvironmentType>, transition: Transition) -> CGSize {
let intrinsicHeight: CGFloat = 41.0
let intrinsicHeight: CGFloat = 34.0
let height = intrinsicHeight
let panelEnvironment = environment[PagerComponentPanelEnvironment.self].value

View File

@ -104,6 +104,9 @@ final class EntityKeyboardAnimationTopPanelComponent: Component {
let itemEnvironment = environment[EntityKeyboardTopPanelItemEnvironment.self].value
let dimensions = component.file.dimensions?.cgSize ?? CGSize(width: 512.0, height: 512.0)
let displaySize = dimensions.aspectFitted(CGSize(width: 44.0, height: 44.0))
if self.itemLayer == nil {
let itemLayer = EmojiPagerContentComponent.View.ItemLayer(
item: EmojiPagerContentComponent.Item(
@ -119,7 +122,7 @@ final class EntityKeyboardAnimationTopPanelComponent: Component {
renderer: component.animationRenderer,
placeholderColor: .lightGray,
blurredBadgeColor: .clear,
pointSize: CGSize(width: 44.0, height: 44.0),
pointSize: displaySize,
onUpdateDisplayPlaceholder: { [weak self] displayPlaceholder, duration in
guard let strongSelf = self else {
return
@ -135,8 +138,9 @@ final class EntityKeyboardAnimationTopPanelComponent: Component {
}
}
let iconSize: CGSize = itemEnvironment.isExpanded ? CGSize(width: 44.0, height: 44.0) : CGSize(width: 28.0, height: 28.0)
let iconFrame = CGRect(origin: CGPoint(x: floor((availableSize.width - iconSize.width) / 2.0), y: 0.0), size: iconSize)
let iconFitSize: CGSize = itemEnvironment.isExpanded ? CGSize(width: 44.0, height: 44.0) : CGSize(width: 26.0, height: 26.0)
let iconSize = dimensions.aspectFitted(iconFitSize)
let iconFrame = CGRect(origin: CGPoint(x: floor((availableSize.width - iconSize.width) / 2.0), y: floor((iconFitSize.height - iconSize.height) / 2.0)), size: iconSize)
if let itemLayer = self.itemLayer {
transition.setPosition(layer: itemLayer, position: CGPoint(x: iconFrame.midX, y: iconFrame.midY))
@ -234,25 +238,33 @@ final class EntityKeyboardAnimationTopPanelComponent: Component {
final class EntityKeyboardIconTopPanelComponent: Component {
typealias EnvironmentType = EntityKeyboardTopPanelItemEnvironment
let imageName: String
enum Icon {
case featured
case trending
case recent
case saved
case premium
}
let icon: Icon
let theme: PresentationTheme
let title: String
let pressed: () -> Void
init(
imageName: String,
icon: Icon,
theme: PresentationTheme,
title: String,
pressed: @escaping () -> Void
) {
self.imageName = imageName
self.icon = icon
self.theme = theme
self.title = title
self.pressed = pressed
}
static func ==(lhs: EntityKeyboardIconTopPanelComponent, rhs: EntityKeyboardIconTopPanelComponent) -> Bool {
if lhs.imageName != rhs.imageName {
if lhs.icon != rhs.icon {
return false
}
if lhs.theme !== rhs.theme {
@ -293,11 +305,19 @@ final class EntityKeyboardIconTopPanelComponent: Component {
func update(component: EntityKeyboardIconTopPanelComponent, availableSize: CGSize, state: EmptyComponentState, environment: Environment<EnvironmentType>, transition: Transition) -> CGSize {
let itemEnvironment = environment[EntityKeyboardTopPanelItemEnvironment.self].value
if self.component?.imageName != component.imageName {
self.iconView.image = generateTintedImage(image: UIImage(bundleImageName: component.imageName), color: component.theme.chat.inputMediaPanel.panelIconColor)
if component.imageName.hasSuffix("PremiumIcon") {
self.iconView.image = generateImage(CGSize(width: 44.0, height: 42.0), contextGenerator: { size, context in
if self.component?.icon != component.icon {
var image: UIImage?
switch component.icon {
case .featured:
image = UIImage(bundleImageName: "Chat/Input/Media/PanelFeaturedIcon")
case .trending:
image = UIImage(bundleImageName: "Chat/Input/Media/PanelTrendingIcon")
case .recent:
image = UIImage(bundleImageName: "Chat/Input/Media/PanelRecentIcon")
case .saved:
image = UIImage(bundleImageName: "Chat/Input/Media/PanelSavedIcon")
case .premium:
image = generateImage(CGSize(width: 44.0, height: 42.0), contextGenerator: { size, context in
context.clear(CGRect(origin: CGPoint(), size: size))
if let image = UIImage(bundleImageName: "Peer Info/PremiumIcon") {
if let cgImage = image.cgImage {
@ -318,12 +338,26 @@ final class EntityKeyboardIconTopPanelComponent: Component {
}
})
}
self.iconView.image = image
}
self.component = component
let nativeIconSize: CGSize = itemEnvironment.isExpanded ? CGSize(width: 44.0, height: 44.0) : CGSize(width: 28.0, height: 28.0)
let boundingIconSize: CGSize = itemEnvironment.isExpanded ? CGSize(width: 38.0, height: 38.0) : CGSize(width: 28.0, height: 28.0)
let color = itemEnvironment.isHighlighted ? component.theme.chat.inputMediaPanel.panelHighlightedIconColor : component.theme.chat.inputMediaPanel.panelIconColor
if self.iconView.tintColor != color {
if !transition.animation.isImmediate {
UIView.animate(withDuration: 0.15, delay: 0.0, options: [], animations: {
self.iconView.tintColor = color
}, completion: nil)
} else {
self.iconView.tintColor = color
}
}
let nativeIconSize: CGSize = itemEnvironment.isExpanded ? CGSize(width: 44.0, height: 44.0) : CGSize(width: 24.0, height: 24.0)
let boundingIconSize: CGSize = itemEnvironment.isExpanded ? CGSize(width: 38.0, height: 38.0) : CGSize(width: 24.0, height: 24.0)
let iconSize = (self.iconView.image?.size ?? nativeIconSize).aspectFitted(boundingIconSize)
let iconFrame = CGRect(origin: CGPoint(x: floor((availableSize.width - iconSize.width) / 2.0), y: floor((nativeIconSize.height - iconSize.height) / 2.0)), size: iconSize)
@ -406,6 +440,36 @@ final class EntityKeyboardStaticStickersPanelComponent: Component {
}
final class View: UIView, UIScrollViewDelegate {
private struct ItemLayout {
var isExpanded: Bool
var isActive: Bool
var baseItemSize: CGFloat
var itemSize: CGFloat
var itemSpacing: CGFloat
var sideInset: CGFloat
var itemOffset: CGFloat
var contentSize: CGSize
init(isExpanded: Bool, isActive: Bool, width: CGFloat, height: CGFloat, itemCount: Int) {
self.isExpanded = isExpanded
self.isActive = isActive
self.baseItemSize = 42.0
self.itemSize = isExpanded ? self.baseItemSize : 24.0
self.itemSpacing = 4.0
self.sideInset = isExpanded ? 5.0 : 2.0
self.itemOffset = isExpanded ? -8.0 : 0.0
self.contentSize = CGSize(width: self.sideInset * 2.0 + CGFloat(itemCount) * self.itemSize + CGFloat(itemCount - 1) * self.itemSpacing, height: height)
}
func frame(at index: Int) -> CGRect {
var frame = CGRect(origin: CGPoint(x: self.sideInset + CGFloat(index) * (self.itemSize + self.itemSpacing), y: floor(self.contentSize.height - self.itemSize) / 2.0 + self.itemOffset), size: CGSize(width: self.itemSize, height: self.itemSize))
if self.isActive && !self.isExpanded {
frame = frame.insetBy(dx: 2.0, dy: 2.0)
}
return frame
}
}
private let scrollViewContainer: UIView
private let scrollView: UIScrollView
private var visibleItemViews: [EmojiPagerContentComponent.StaticEmojiSegment: ComponentView<Empty>] = [:]
@ -415,6 +479,8 @@ final class EntityKeyboardStaticStickersPanelComponent: Component {
private var component: EntityKeyboardStaticStickersPanelComponent?
private var itemEnvironment: EntityKeyboardTopPanelItemEnvironment?
private var itemLayout: ItemLayout?
private var ignoreScrolling: Bool = false
override init(frame: CGRect) {
@ -452,13 +518,27 @@ final class EntityKeyboardStaticStickersPanelComponent: Component {
@objc private func tapGesture(_ recognizer: UITapGestureRecognizer) {
if case .ended = recognizer.state {
if !self.bounds.contains(recognizer.location(in: self)) {
return
}
let scrollViewLocation = recognizer.location(in: self.scrollView)
var closestItem: (distance: CGFloat, id: EmojiPagerContentComponent.StaticEmojiSegment)?
for (id, itemView) in self.visibleItemViews {
if let view = itemView.view, view.frame.insetBy(dx: -4.0, dy: -4.0).contains(scrollViewLocation) {
self.component?.pressed(id)
break
if let view = itemView.view {
let distance = abs(view.center.x - scrollViewLocation.x)
if let closestItemValue = closestItem {
if distance < closestItemValue.distance {
closestItem = (distance, id)
}
} else {
closestItem = (distance, id)
}
}
}
if let closestItem = closestItem {
self.component?.pressed(closestItem.id)
}
}
}
@ -470,25 +550,17 @@ final class EntityKeyboardStaticStickersPanelComponent: Component {
}
private func updateVisibleItems(transition: Transition, animateAppearingItems: Bool) {
guard let component = self.component, let itemEnvironment = self.itemEnvironment else {
guard let component = self.component, let itemEnvironment = self.itemEnvironment, let itemLayout = self.itemLayout else {
return
}
var validItemIds = Set<EmojiPagerContentComponent.StaticEmojiSegment>()
let visibleBounds = self.scrollView.bounds
let componentHeight: CGFloat = self.scrollView.contentSize.height
let isExpanded = componentHeight > 32.0
let items = EmojiPagerContentComponent.StaticEmojiSegment.allCases
let itemSize: CGFloat = isExpanded ? 42.0 : 32.0
let itemSpacing: CGFloat = 4.0
let sideInset: CGFloat = isExpanded ? 5.0 : 2.0
let itemOffset: CGFloat = isExpanded ? -8.0 : 0.0
for i in 0 ..< items.count {
let itemFrame = CGRect(origin: CGPoint(x: sideInset + CGFloat(i) * (itemSize + itemSpacing), y: floor(componentHeight - itemSize) / 2.0 + itemOffset), size: CGSize(width: itemSize, height: itemSize))
if visibleBounds.intersects(itemFrame) {
let itemFrame = itemLayout.frame(at: i)
if true/*visibleBounds.intersects(itemFrame)*/ {
let item = items[i]
validItemIds.insert(item)
@ -503,6 +575,7 @@ final class EntityKeyboardStaticStickersPanelComponent: Component {
itemView = ComponentView<Empty>()
self.visibleItemViews[item] = itemView
}
let _ = animateItem
let animationName: String
switch item {
@ -526,29 +599,45 @@ final class EntityKeyboardStaticStickersPanelComponent: Component {
let color: UIColor
if itemEnvironment.highlightedSubgroupId == AnyHashable(items[i].rawValue) {
color = component.theme.chat.inputMediaPanel.panelIconColor.mixedWith(component.theme.chat.inputPanel.primaryTextColor, alpha: 0.35)
color = component.theme.chat.inputMediaPanel.panelHighlightedIconColor
} else {
color = component.theme.chat.inputMediaPanel.panelIconColor
}
let _ = itemTransition
let _ = itemView.update(
transition: itemTransition,
transition: .immediate,
component: AnyComponent(LottieAnimationComponent(
animation: LottieAnimationComponent.AnimationItem(
name: animationName,
mode: animateItem ? .animating(loop: false) : .still(position: .end)
mode: .still(position: .end)
),
colors: ["__allcolors__": color],
size: CGSize(width: itemSize, height: itemSize)
size: CGSize(width: itemLayout.baseItemSize, height: itemLayout.baseItemSize)
)),
environment: {},
containerSize: CGSize(width: itemSize, height: itemSize)
containerSize: CGSize(width: itemLayout.baseItemSize, height: itemLayout.baseItemSize)
)
if let view = itemView.view {
if view.superview == nil {
self.scrollView.addSubview(view)
}
itemTransition.setFrame(view: view, frame: itemFrame)
itemTransition.setPosition(view: view, position: CGPoint(x: itemFrame.midX, y: itemFrame.midY))
itemTransition.setBounds(view: view, bounds: CGRect(origin: CGPoint(), size: CGSize(width: itemLayout.baseItemSize, height: itemLayout.baseItemSize)))
let scaleFactor = itemFrame.width / itemLayout.baseItemSize
itemTransition.setSublayerTransform(view: view, transform: CATransform3DMakeScale(scaleFactor, scaleFactor, 1.0))
let isHidden = !visibleBounds.intersects(itemFrame)
if isHidden != view.isHidden {
view.isHidden = isHidden
if !isHidden {
if let view = view as? LottieAnimationComponent.View {
view.playOnce()
}
}
}
}
}
}
@ -566,9 +655,6 @@ final class EntityKeyboardStaticStickersPanelComponent: Component {
}
func update(component: EntityKeyboardStaticStickersPanelComponent, availableSize: CGSize, state: EmptyComponentState, environment: Environment<EnvironmentType>, transition: Transition) -> CGSize {
transition.setFrame(view: self.scrollViewContainer, frame: CGRect(origin: CGPoint(), size: availableSize))
transition.setCornerRadius(layer: self.scrollViewContainer.layer, cornerRadius: min(availableSize.width / 2.0, availableSize.height / 2.0))
let itemEnvironment = environment[EntityKeyboardTopPanelItemEnvironment.self].value
var scrollToItem: AnyHashable?
@ -579,30 +665,32 @@ final class EntityKeyboardStaticStickersPanelComponent: Component {
self.component = component
self.itemEnvironment = itemEnvironment
let isExpanded = itemEnvironment.isExpanded
let itemSize: CGFloat = isExpanded ? 42.0 : 32.0
let itemSpacing: CGFloat = 4.0
let sideInset: CGFloat = isExpanded ? 5.0 : 2.0
let itemCount = EmojiPagerContentComponent.StaticEmojiSegment.allCases.count
let itemLayout = ItemLayout(isExpanded: itemEnvironment.isExpanded, isActive: itemEnvironment.isHighlighted, width: availableSize.width, height: availableSize.height, itemCount: EmojiPagerContentComponent.StaticEmojiSegment.allCases.count)
self.itemLayout = itemLayout
transition.setFrame(view: self.scrollViewContainer, frame: CGRect(origin: CGPoint(x: 0.0, y: 0.0), size: CGSize(width: availableSize.width, height: availableSize.height)))
transition.setCornerRadius(layer: self.scrollViewContainer.layer, cornerRadius: min(availableSize.width / 2.0, availableSize.height / 2.0))
self.ignoreScrolling = true
self.scrollView.frame = CGRect(origin: CGPoint(), size: CGSize(width: max(availableSize.width, 160.0), height: availableSize.height))
self.scrollView.contentSize = CGSize(width: sideInset * 2.0 + itemSize * CGFloat(itemCount) + itemSpacing * CGFloat(itemCount - 1), height: availableSize.height)
self.scrollView.frame = CGRect(origin: CGPoint(), size: CGSize(width: max(availableSize.width, 126.0), height: availableSize.height))
self.scrollView.contentSize = itemLayout.contentSize
self.ignoreScrolling = false
self.updateVisibleItems(transition: transition, animateAppearingItems: false)
if (!itemEnvironment.isHighlighted || isExpanded) && self.scrollView.contentOffset.x != 0.0 {
if (!itemEnvironment.isHighlighted || itemLayout.isExpanded) && self.scrollView.contentOffset.x != 0.0 {
self.scrollView.setContentOffset(CGPoint(), animated: true)
scrollToItem = nil
}
self.scrollView.isUserInteractionEnabled = itemEnvironment.isHighlighted && !itemLayout.isExpanded
if let scrollToItem = scrollToItem {
let items = EmojiPagerContentComponent.StaticEmojiSegment.allCases
for i in 0 ..< items.count {
if AnyHashable(items[i].rawValue) == scrollToItem {
let itemFrame = CGRect(origin: CGPoint(x: sideInset + CGFloat(i) * (itemSize + itemSpacing), y: 0.0), size: CGSize(width: itemSize, height: itemSize))
self.scrollView.scrollRectToVisible(itemFrame.insetBy(dx: -sideInset, dy: 0.0), animated: true)
let itemFrame = itemLayout.frame(at: i)
self.scrollView.scrollRectToVisible(itemFrame.insetBy(dx: -itemLayout.sideInset, dy: 0.0), animated: true)
break
}
}
@ -954,28 +1042,30 @@ final class EntityKeyboardTopPanelComponent: Component {
var innerFrame: CGRect
}
let topInset: CGFloat = -3.0
let sideInset: CGFloat = 7.0
let itemSize: CGSize
let staticItemSize: CGSize
let staticExpandedItemSize: CGSize
let innerItemSize: CGSize
let itemSpacing: CGFloat = 15.0
let itemSpacing: CGFloat
let contentSize: CGSize
let isExpanded: Bool
let items: [Item]
init(isExpanded: Bool, height: CGFloat, items: [ItemDescription]) {
self.isExpanded = isExpanded
self.itemSize = self.isExpanded ? CGSize(width: 54.0, height: 68.0) : CGSize(width: 32.0, height: 32.0)
self.itemSize = self.isExpanded ? CGSize(width: 54.0, height: 68.0) : CGSize(width: 28.0, height: 28.0)
self.staticItemSize = self.itemSize
self.staticExpandedItemSize = self.isExpanded ? self.staticItemSize : CGSize(width: 160.0, height: 32.0)
self.innerItemSize = self.isExpanded ? CGSize(width: 50.0, height: 62.0) : CGSize(width: 28.0, height: 28.0)
self.staticExpandedItemSize = self.isExpanded ? self.staticItemSize : CGSize(width: 126.0, height: 28.0)
self.innerItemSize = self.isExpanded ? CGSize(width: 50.0, height: 62.0) : CGSize(width: 24.0, height: 24.0)
self.itemSpacing = 8.0
var contentSize = CGSize(width: sideInset, height: height)
var resultItems: [Item] = []
var isFirst = true
let itemY = floor((contentSize.height - self.itemSize.height) / 2.0)
let itemY = self.topInset + floor((contentSize.height - self.itemSize.height) / 2.0)
for item in items {
if isFirst {
isFirst = false
@ -1446,8 +1536,8 @@ final class EntityKeyboardTopPanelComponent: Component {
}
var visibleBounds = self.scrollView.bounds
visibleBounds.origin.x -= 200.0
visibleBounds.size.width += 400.0
visibleBounds.origin.x -= 280.0
visibleBounds.size.width += 560.0
let scale = max(0.01, self.visibilityFraction)
@ -1511,7 +1601,7 @@ final class EntityKeyboardTopPanelComponent: Component {
let panelEnvironment = environment[EntityKeyboardTopContainerPanelEnvironment.self].value
self.environment = panelEnvironment
let isExpanded = availableSize.height > 41.0
let isExpanded = availableSize.height > 34.0
let wasExpanded = self.isExpanded
self.isExpanded = isExpanded
@ -1576,8 +1666,8 @@ final class EntityKeyboardTopPanelComponent: Component {
}
var visibleBounds = self.scrollView.bounds
visibleBounds.origin.x -= 200.0
visibleBounds.size.width += 400.0
visibleBounds.origin.x -= 280.0
visibleBounds.size.width += 560.0
let previousVisibleRange = previousItemLayout.visibleItemRange(for: visibleBounds)
if previousVisibleRange.minIndex <= previousVisibleRange.maxIndex {
@ -1626,8 +1716,8 @@ final class EntityKeyboardTopPanelComponent: Component {
updatedBounds = newBounds
var updatedVisibleBounds = newBounds
updatedVisibleBounds.origin.x -= 200.0
updatedVisibleBounds.size.width += 400.0
updatedVisibleBounds.origin.x -= 280.0
updatedVisibleBounds.size.width += 560.0
let updatedVisibleRange = itemLayout.visibleItemRange(for: updatedVisibleBounds)
if useRightAnchor {

View File

@ -755,7 +755,7 @@ public final class GifPagerContentComponent: Component {
guard let theme = self.theme else {
return
}
self.backgroundView.updateColor(color: theme.chat.inputMediaPanel.stickersBackgroundColor.withMultipliedAlpha(0.75), enableBlur: true, forceKeepBlur: false, transition: transition.containedViewLayoutTransition)
self.backgroundView.updateColor(color: theme.chat.inputMediaPanel.backgroundColor, enableBlur: true, forceKeepBlur: false, transition: transition.containedViewLayoutTransition)
transition.setFrame(view: self.backgroundView, frame: backgroundFrame)
self.backgroundView.update(size: backgroundFrame.size, transition: transition.containedViewLayoutTransition)
}

View File

@ -17,7 +17,7 @@ public func cacheLottieAnimation(data: Data, width: Int, height: Int, writer: An
let frameSkip: Int
if animation.frameRate >= 60 {
if ProcessInfo.processInfo.activeProcessorCount > 2 {
if ProcessInfo.processInfo.processorCount > 2 {
frameSkip = 1
} else {
frameSkip = 2

View File

@ -779,7 +779,7 @@ public final class MultiAnimationMetalRendererImpl: MultiAnimationRenderer {
}
public init() {
if !ProcessInfo.processInfo.isLowPowerModeEnabled && ProcessInfo.processInfo.activeProcessorCount > 2 {
if !ProcessInfo.processInfo.isLowPowerModeEnabled && ProcessInfo.processInfo.processorCount > 2 {
self.frameSkip = 1
} else {
self.frameSkip = 2

View File

@ -131,7 +131,9 @@ private final class ItemAnimationContext {
let blurredWidth = 12
let blurredHeight = 12
let context = DrawingContext(size: CGSize(width: CGFloat(blurredWidth), height: CGFloat(blurredHeight)), scale: 1.0, opaque: true, bytesPerRow: bytesPerRow)
let size = CGSize(width: CGFloat(blurredWidth), height: CGFloat(blurredHeight))
data.withUnsafeBytes { bytes -> Void in
if let dataProvider = CGDataProvider(dataInfo: nil, data: bytes.baseAddress!, size: bytes.count, releaseData: { _, _, _ in }) {
let image = CGImage(
@ -148,7 +150,6 @@ private final class ItemAnimationContext {
intent: .defaultIntent
)
if let image = image {
let size = CGSize(width: CGFloat(blurredWidth), height: CGFloat(blurredHeight))
context.withFlippedContext { c in
c.setFillColor((color ?? .white).cgColor)
c.fill(CGRect(origin: CGPoint(), size: size))
@ -202,6 +203,11 @@ private final class ItemAnimationContext {
}
vImageMatrixMultiply_ARGB8888(&destinationBuffer, &destinationBuffer, &matrix, divisor, nil, nil, vImage_Flags(kvImageDoNotTile))
context.withFlippedContext { c in
c.setFillColor((color ?? .white).withMultipliedAlpha(0.6).cgColor)
c.fill(CGRect(origin: CGPoint(), size: size))
}
}
self.blurredRepresentationValue = context.generateImage()
@ -556,7 +562,7 @@ public final class MultiAnimationRendererImpl: MultiAnimationRenderer {
}
public init() {
if !ProcessInfo.processInfo.isLowPowerModeEnabled && ProcessInfo.processInfo.activeProcessorCount > 2 {
if !ProcessInfo.processInfo.isLowPowerModeEnabled && ProcessInfo.processInfo.processorCount > 2 {
self.frameSkip = 1
} else {
self.frameSkip = 2

View File

@ -1,12 +1,15 @@
{
"images" : [
{
"filename" : "ic_clear.pdf",
"filename" : "backspace_24.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View File

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.6581 5.56807C9.26054 4.9489 10.0877 4.59961 10.9516 4.59961H18.4004C20.1677 4.59961 21.6004 6.0323 21.6004 7.79961V16.1996C21.6004 17.9669 20.1677 19.3996 18.4004 19.3996H10.9516C10.0877 19.3996 9.26054 19.0503 8.6581 18.4311L3.486 13.1154C2.88168 12.4943 2.88168 11.5049 3.486 10.8838L8.6581 5.56807Z" stroke="black" stroke-width="1.66"/>
<path d="M11.5996 9.2002L17.1996 14.8002" stroke="black" stroke-width="1.66" stroke-linecap="round"/>
<path d="M11.5996 14.7998L17.1996 9.1998" stroke="black" stroke-width="1.66" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 659 B

View File

@ -1,107 +0,0 @@
%PDF-1.7
1 0 obj
<< >>
endobj
2 0 obj
<< /Length 3 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 3.180420 6.169983 cm
0.000000 0.000000 0.000000 scn
7.131522 16.439991 m
8.015658 17.225891 9.157463 17.660004 10.340398 17.660004 c
19.819601 17.660004 l
22.487137 17.660004 24.649601 15.497540 24.649601 12.830004 c
24.649601 4.830004 l
24.649601 2.162468 22.487137 0.000004 19.819601 0.000004 c
10.340399 0.000004 l
9.157463 0.000004 8.015657 0.434116 7.131521 1.220016 c
0.949850 6.714835 l
-0.316617 7.840584 -0.316617 9.819424 0.949850 10.945172 c
7.131522 16.439991 l
h
10.340398 16.000004 m
9.564020 16.000004 8.814637 15.715089 8.234365 15.199291 c
2.052694 9.704473 l
1.529102 9.239058 1.529102 8.420950 2.052694 7.955535 c
8.234365 2.460716 l
8.814637 1.944919 9.564020 1.660004 10.340399 1.660004 c
19.819601 1.660004 l
21.570343 1.660004 22.989601 3.079261 22.989601 4.830004 c
22.989601 12.830004 l
22.989601 14.580747 21.570343 16.000004 19.819601 16.000004 c
10.340398 16.000004 l
h
10.732702 12.916903 m
11.056838 13.241037 11.582364 13.241037 11.906500 12.916903 c
14.819601 10.003801 l
17.732702 12.916903 l
18.056837 13.241037 18.582365 13.241037 18.906500 12.916903 c
19.230635 12.592768 19.230635 12.067240 18.906500 11.743105 c
15.993399 8.830004 l
18.906500 5.916903 l
19.230635 5.592768 19.230635 5.067240 18.906500 4.743105 c
18.582365 4.418970 18.056837 4.418970 17.732702 4.743105 c
14.819601 7.656206 l
11.906500 4.743105 l
11.582364 4.418970 11.056838 4.418970 10.732702 4.743105 c
10.408567 5.067241 10.408567 5.592767 10.732702 5.916903 c
13.645803 8.830004 l
10.732702 11.743105 l
10.408567 12.067240 10.408567 12.592768 10.732702 12.916903 c
h
f*
n
Q
endstream
endobj
3 0 obj
1651
endobj
4 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 30.000000 30.000000 ]
/Resources 1 0 R
/Contents 2 0 R
/Parent 5 0 R
>>
endobj
5 0 obj
<< /Kids [ 4 0 R ]
/Count 1
/Type /Pages
>>
endobj
6 0 obj
<< /Pages 5 0 R
/Type /Catalog
>>
endobj
xref
0 7
0000000000 65535 f
0000000010 00000 n
0000000034 00000 n
0000001741 00000 n
0000001764 00000 n
0000001937 00000 n
0000002011 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 6 0 R
/Size 7
>>
startxref
2070
%%EOF

View File

@ -1,12 +1,15 @@
{
"images" : [
{
"filename" : "ic_emoji.pdf",
"filename" : "emoji.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View File

@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.0007 3.6307C7.37808 3.6307 3.6307 7.37808 3.6307 12.0007C3.6307 16.6233 7.37808 20.3707 12.0007 20.3707C16.6233 20.3707 20.3707 16.6233 20.3707 12.0007C20.3707 7.37808 16.6233 3.6307 12.0007 3.6307ZM1.9707 12.0007C1.9707 6.46129 6.46129 1.9707 12.0007 1.9707C17.5401 1.9707 22.0307 6.46129 22.0307 12.0007C22.0307 17.5401 17.5401 22.0307 12.0007 22.0307C6.46129 22.0307 1.9707 17.5401 1.9707 12.0007Z" fill="black"/>
<ellipse cx="8.83407" cy="10.1528" rx="1.17391" ry="1.36957" fill="black" stroke="black" stroke-width="0.33"/>
<ellipse cx="15.1739" cy="10.1528" rx="1.17391" ry="1.36957" fill="black" stroke="black" stroke-width="0.33"/>
<path d="M15.5 14.5703C15.5 14.5703 14.3627 16.4996 12 16.4996C9.63727 16.4996 8.5 14.5703 8.5 14.5703" stroke="black" stroke-width="1.66" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 959 B

View File

@ -1,123 +0,0 @@
%PDF-1.7
1 0 obj
<< >>
endobj
2 0 obj
<< /Length 3 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 7.292999 5.741058 cm
0.000000 0.000000 0.000000 scn
7.706251 7.052563 m
9.859218 7.052563 11.806032 7.518116 13.204300 7.852490 c
14.570075 8.179095 15.412500 8.380550 15.412500 7.900764 c
15.412500 3.644719 11.962295 0.194514 7.706251 0.194514 c
3.450206 0.194514 0.000000 3.644719 0.000000 7.900764 c
0.000000 8.380550 0.842425 8.179095 2.208200 7.852490 c
3.606467 7.518116 5.553283 7.052563 7.706251 7.052563 c
h
12.468611 6.348519 m
11.392131 6.066849 9.742197 5.635127 7.697002 5.635127 c
5.651808 5.635127 4.001874 6.066849 2.925394 6.348519 c
2.030582 6.582655 1.532002 6.713113 1.532002 6.405752 c
1.532002 3.455799 6.013958 3.323253 7.697002 3.323253 c
9.586575 3.323253 13.862001 3.456314 13.862001 6.405752 c
13.862001 6.713113 13.363423 6.582655 12.468611 6.348519 c
h
f*
n
Q
q
1.000000 0.000000 -0.000000 1.000000 2.669983 2.669983 cm
0.000000 0.000000 0.000000 scn
12.330000 23.000004 m
6.437122 23.000004 1.660000 18.222881 1.660000 12.330004 c
1.660000 6.437126 6.437122 1.660004 12.330000 1.660004 c
18.222878 1.660004 23.000000 6.437126 23.000000 12.330004 c
23.000000 18.222881 18.222878 23.000004 12.330000 23.000004 c
h
0.000000 12.330004 m
0.000000 19.139675 5.520329 24.660004 12.330000 24.660004 c
19.139671 24.660004 24.660000 19.139675 24.660000 12.330004 c
24.660000 5.520332 19.139671 0.000004 12.330000 0.000004 c
5.520329 0.000004 0.000000 5.520332 0.000000 12.330004 c
h
f*
n
Q
q
1.000000 0.000000 -0.000000 1.000000 10.000000 16.250000 cm
0.000000 0.000000 0.000000 scn
3.000000 1.750000 m
3.000000 0.783502 2.328427 0.000000 1.500000 0.000000 c
0.671573 0.000000 0.000000 0.783502 0.000000 1.750000 c
0.000000 2.716498 0.671573 3.500000 1.500000 3.500000 c
2.328427 3.500000 3.000000 2.716498 3.000000 1.750000 c
h
f
n
Q
q
1.000000 0.000000 -0.000000 1.000000 17.000000 16.250000 cm
0.000000 0.000000 0.000000 scn
3.000000 1.750000 m
3.000000 0.783502 2.328427 0.000000 1.500000 0.000000 c
0.671573 0.000000 0.000000 0.783502 0.000000 1.750000 c
0.000000 2.716498 0.671573 3.500000 1.500000 3.500000 c
2.328427 3.500000 3.000000 2.716498 3.000000 1.750000 c
h
f
n
Q
endstream
endobj
3 0 obj
2167
endobj
4 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 30.000000 30.000000 ]
/Resources 1 0 R
/Contents 2 0 R
/Parent 5 0 R
>>
endobj
5 0 obj
<< /Kids [ 4 0 R ]
/Count 1
/Type /Pages
>>
endobj
6 0 obj
<< /Pages 5 0 R
/Type /Catalog
>>
endobj
xref
0 7
0000000000 65535 f
0000000010 00000 n
0000000034 00000 n
0000002257 00000 n
0000002280 00000 n
0000002453 00000 n
0000002527 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 6 0 R
/Size 7
>>
startxref
2586
%%EOF

View File

@ -1,12 +1,15 @@
{
"images" : [
{
"filename" : "ic_gifs.pdf",
"filename" : "gifs.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View File

@ -0,0 +1,7 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="3" width="20" height="18" rx="5.6" stroke="black" stroke-width="1.66"/>
<path d="M16.25 14.5V10.3C16.25 10.02 16.25 9.87996 16.3045 9.773C16.3524 9.67892 16.4289 9.60243 16.523 9.5545C16.63 9.5 16.77 9.5 17.05 9.5H18.75" stroke="black" stroke-width="1.6625" stroke-linecap="round"/>
<path d="M16.25 12H18.75" stroke="black" stroke-width="1.6625" stroke-linecap="round"/>
<path d="M12.998 9.5V14.5" stroke="black" stroke-width="1.6625" stroke-linecap="round"/>
<path d="M8.90316 9.78126C8.55813 9.60157 8.16593 9.5 7.75 9.5C6.36929 9.5 5.25 10.6193 5.25 12C5.25 13.3807 6.36929 14.5 7.75 14.5C8.75 14.5 9.76602 13.8481 9.99037 12.6675L10.0208 12.3267C10.0365 12.1512 9.89823 12 9.722 12H8.75" stroke="black" stroke-width="1.6625" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 872 B

View File

@ -1,128 +0,0 @@
%PDF-1.7
1 0 obj
<< >>
endobj
2 0 obj
<< /Length 3 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 2.669983 2.670013 cm
0.000000 0.000000 0.000000 scn
12.330000 22.999989 m
6.437122 22.999989 1.660000 18.222866 1.660000 12.329988 c
1.660000 6.437111 6.437122 1.659988 12.330000 1.659988 c
18.222878 1.659988 23.000000 6.437111 23.000000 12.329988 c
23.000000 18.222866 18.222878 22.999989 12.330000 22.999989 c
h
0.000000 12.329988 m
0.000000 19.139660 5.520329 24.659988 12.330000 24.659988 c
19.139671 24.659988 24.660000 19.139660 24.660000 12.329988 c
24.660000 5.520317 19.139671 -0.000011 12.330000 -0.000011 c
5.520329 -0.000011 0.000000 5.520317 0.000000 12.329988 c
h
17.108725 15.659992 m
17.129999 15.659988 l
18.830000 15.659988 l
19.288397 15.659988 19.660000 15.288384 19.660000 14.829988 c
19.660000 14.371593 19.288397 13.999989 18.830000 13.999989 c
17.160000 13.999989 l
17.160000 13.159988 l
18.830000 13.159988 l
19.288397 13.159988 19.660000 12.788384 19.660000 12.329988 c
19.660000 11.871593 19.288397 11.499989 18.830000 11.499989 c
17.160000 11.499989 l
17.160000 9.829988 l
17.160000 9.371592 16.788397 8.999989 16.330000 8.999989 c
15.871604 8.999989 15.500000 9.371592 15.500000 9.829988 c
15.500000 12.329988 l
15.500000 14.029988 l
15.499996 14.051264 l
15.499962 14.172362 15.499924 14.307926 15.509568 14.425976 c
15.520575 14.560680 15.548159 14.743810 15.644961 14.933796 c
15.772472 15.184052 15.975937 15.387516 16.226192 15.515027 c
16.416180 15.611830 16.599308 15.639414 16.734013 15.650420 c
16.852062 15.660065 16.987627 15.660027 17.108725 15.659992 c
h
13.330000 15.659988 m
13.788396 15.659988 14.160000 15.288384 14.160000 14.829988 c
14.160000 9.829988 l
14.160000 9.371592 13.788396 8.999989 13.330000 8.999989 c
12.871604 8.999989 12.500000 9.371592 12.500000 9.829988 c
12.500000 14.829988 l
12.500000 15.288384 12.871604 15.659988 13.330000 15.659988 c
h
8.330000 15.659988 m
6.490891 15.659988 5.000000 14.169097 5.000000 12.329988 c
5.000000 10.490880 6.490891 8.999989 8.330000 8.999989 c
9.670162 8.999989 11.076591 9.880583 11.385777 11.507551 c
11.393431 11.547824 l
11.397078 11.588655 l
11.427523 11.929440 l
11.486586 12.590580 10.965777 13.159988 10.302004 13.159988 c
9.330000 13.159988 l
8.871603 13.159988 8.500000 12.788385 8.500000 12.329988 c
8.500000 11.871592 8.871603 11.499989 9.330000 11.499989 c
9.657213 11.499989 l
9.421404 10.962639 8.887941 10.659988 8.330000 10.659988 c
7.407684 10.659988 6.660000 11.407673 6.660000 12.329988 c
6.660000 13.252304 7.407684 13.999989 8.330000 13.999989 c
8.609308 13.999989 8.870320 13.932076 9.099771 13.812578 c
9.506336 13.600842 10.007568 13.758780 10.219306 14.165344 c
10.431044 14.571908 10.273106 15.073140 9.866541 15.284878 c
9.405935 15.524760 8.882543 15.659988 8.330000 15.659988 c
h
f*
n
Q
endstream
endobj
3 0 obj
2783
endobj
4 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 30.000000 30.000000 ]
/Resources 1 0 R
/Contents 2 0 R
/Parent 5 0 R
>>
endobj
5 0 obj
<< /Kids [ 4 0 R ]
/Count 1
/Type /Pages
>>
endobj
6 0 obj
<< /Pages 5 0 R
/Type /Catalog
>>
endobj
xref
0 7
0000000000 65535 f
0000000010 00000 n
0000000034 00000 n
0000002873 00000 n
0000002896 00000 n
0000003069 00000 n
0000003143 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 6 0 R
/Size 7
>>
startxref
3202
%%EOF

View File

@ -1,12 +1,15 @@
{
"images" : [
{
"filename" : "planet.pdf",
"filename" : "keyboard_24.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View File

@ -0,0 +1,8 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="12" cy="12" r="9.2" stroke="black" stroke-width="1.66"/>
<ellipse cx="12" cy="12" rx="5.2" ry="9.2" stroke="black" stroke-width="1.328"/>
<path d="M12 2.8V21.2" stroke="black" stroke-width="1.328"/>
<path d="M2.8 12L21.2 12" stroke="black" stroke-width="1.328"/>
<path d="M4.4 17.6C4.4 17.6 6.75325 16 12 16C17.2468 16 19.6 17.6 19.6 17.6" stroke="black" stroke-width="1.328"/>
<path d="M19.6 6.4C19.6 6.4 17.2468 8 12 8C6.75325 8 4.4 6.4 4.4 6.4" stroke="black" stroke-width="1.328"/>
</svg>

After

Width:  |  Height:  |  Size: 601 B

View File

@ -1,255 +0,0 @@
%PDF-1.7
1 0 obj
<< >>
endobj
2 0 obj
<< /Length 3 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 3.500000 1.839844 cm
0.000000 0.000000 0.000000 scn
22.170000 13.160156 m
22.170000 7.267279 17.392878 2.490156 11.500000 2.490156 c
11.500000 0.830156 l
18.309671 0.830156 23.830000 6.350485 23.830000 13.160156 c
22.170000 13.160156 l
h
11.500000 2.490156 m
5.607122 2.490156 0.830000 7.267279 0.830000 13.160156 c
-0.830000 13.160156 l
-0.830000 6.350485 4.690329 0.830156 11.500000 0.830156 c
11.500000 2.490156 l
h
0.830000 13.160156 m
0.830000 19.053034 5.607122 23.830156 11.500000 23.830156 c
11.500000 25.490156 l
4.690329 25.490156 -0.830000 19.969828 -0.830000 13.160156 c
0.830000 13.160156 l
h
11.500000 23.830156 m
17.392878 23.830156 22.170000 19.053034 22.170000 13.160156 c
23.830000 13.160156 l
23.830000 19.969828 18.309671 25.490156 11.500000 25.490156 c
11.500000 23.830156 l
h
f
n
Q
q
1.000000 0.000000 -0.000000 1.000000 8.500000 1.839844 cm
0.000000 0.000000 0.000000 scn
12.170000 13.160156 m
12.170000 10.100716 11.467313 7.371819 10.373627 5.436836 c
9.265684 3.476629 7.863927 2.490156 6.500000 2.490156 c
6.500000 0.830156 l
8.725924 0.830156 10.574167 2.418047 11.818761 4.620020 c
13.077613 6.847219 13.830000 9.868322 13.830000 13.160156 c
12.170000 13.160156 l
h
6.500000 2.490156 m
5.136073 2.490156 3.734316 3.476629 2.626373 5.436836 c
1.532687 7.371819 0.830000 10.100716 0.830000 13.160156 c
-0.830000 13.160156 l
-0.830000 9.868322 -0.077613 6.847219 1.181239 4.620020 c
2.425833 2.418047 4.274076 0.830156 6.500000 0.830156 c
6.500000 2.490156 l
h
0.830000 13.160156 m
0.830000 16.219597 1.532687 18.948494 2.626373 20.883476 c
3.734316 22.843683 5.136073 23.830156 6.500000 23.830156 c
6.500000 25.490156 l
4.274076 25.490156 2.425833 23.902266 1.181239 21.700291 c
-0.077613 19.473093 -0.830000 16.451990 -0.830000 13.160156 c
0.830000 13.160156 l
h
6.500000 23.830156 m
7.863927 23.830156 9.265684 22.843683 10.373627 20.883476 c
11.467313 18.948494 12.170000 16.219597 12.170000 13.160156 c
13.830000 13.160156 l
13.830000 16.451990 13.077613 19.473093 11.818761 21.700291 c
10.574167 23.902266 8.725924 25.490156 6.500000 25.490156 c
6.500000 23.830156 l
h
f
n
Q
q
1.000000 0.000000 -0.000000 1.000000 15.000000 3.500000 cm
0.000000 0.000000 0.000000 scn
-0.830000 23.000000 m
-0.830000 0.000000 l
0.830000 0.000000 l
0.830000 23.000000 l
-0.830000 23.000000 l
h
f
n
Q
q
0.000000 1.000000 -1.000000 0.000000 5.160156 15.000000 cm
0.000000 0.000000 0.000000 scn
-0.830000 1.660156 m
-0.830000 -21.339844 l
0.830000 -21.339844 l
0.830000 1.660156 l
-0.830000 1.660156 l
h
f
n
Q
q
0.000000 1.000000 -1.000000 0.000000 9.019043 8.000000 cm
0.000000 0.000000 0.000000 scn
0.000000 3.519043 m
-0.686377 3.052367 -0.686606 3.052704 -0.686827 3.053029 c
-0.686890 3.053123 -0.687103 3.053437 -0.687230 3.053624 c
-0.687484 3.053999 -0.687707 3.054330 -0.687901 3.054617 c
-0.688287 3.055190 -0.688552 3.055586 -0.688699 3.055805 c
-0.688991 3.056243 -0.688808 3.055973 -0.688163 3.054991 c
-0.686874 3.053027 -0.683741 3.048217 -0.678884 3.040542 c
-0.669169 3.025192 -0.652556 2.998377 -0.630008 2.959931 c
-0.584915 2.883047 -0.516061 2.759615 -0.431147 2.588317 c
-0.261366 2.245815 -0.027114 1.711416 0.209833 0.974417 c
0.683340 -0.498374 1.170000 -2.787649 1.170000 -5.980957 c
2.830000 -5.980957 l
2.830000 -2.615824 2.316660 -0.155099 1.790166 1.482499 c
1.527114 2.300695 1.261366 2.911589 1.056147 3.325581 c
0.953561 3.532529 0.866165 3.690144 0.801883 3.799746 c
0.769744 3.854543 0.743388 3.897330 0.723805 3.928271 c
0.714015 3.943742 0.705917 3.956251 0.699638 3.965818 c
0.696498 3.970602 0.693813 3.974651 0.691598 3.977967 c
0.690490 3.979625 0.689500 3.981099 0.688629 3.982391 c
0.688194 3.983037 0.687788 3.983638 0.687413 3.984192 c
0.687225 3.984469 0.686966 3.984851 0.686872 3.984990 c
0.686621 3.985360 0.686377 3.985719 0.000000 3.519043 c
h
1.170000 -5.980957 m
1.170000 -9.174265 0.683340 -11.463540 0.209833 -12.936331 c
-0.027114 -13.673330 -0.261366 -14.207729 -0.431147 -14.550232 c
-0.516061 -14.721529 -0.584915 -14.844961 -0.630008 -14.921844 c
-0.652556 -14.960291 -0.669169 -14.987106 -0.678884 -15.002457 c
-0.683741 -15.010132 -0.686874 -15.014940 -0.688163 -15.016905 c
-0.688808 -15.017887 -0.688991 -15.018158 -0.688699 -15.017719 c
-0.688552 -15.017500 -0.688287 -15.017103 -0.687901 -15.016531 c
-0.687707 -15.016245 -0.687484 -15.015913 -0.687230 -15.015539 c
-0.687103 -15.015350 -0.686890 -15.015036 -0.686827 -15.014942 c
-0.686606 -15.014618 -0.686377 -15.014280 0.000000 -15.480957 c
0.686377 -15.947634 0.686621 -15.947273 0.686872 -15.946903 c
0.686966 -15.946766 0.687225 -15.946383 0.687413 -15.946106 c
0.687788 -15.945551 0.688194 -15.944952 0.688629 -15.944305 c
0.689500 -15.943014 0.690490 -15.941538 0.691598 -15.939880 c
0.693813 -15.936565 0.696498 -15.932516 0.699638 -15.927732 c
0.705917 -15.918165 0.714015 -15.905657 0.723805 -15.890184 c
0.743388 -15.859243 0.769744 -15.816458 0.801883 -15.761660 c
0.866165 -15.652058 0.953561 -15.494444 1.056147 -15.287495 c
1.261366 -14.873503 1.527114 -14.262609 1.790166 -13.444414 c
2.316660 -11.806815 2.830000 -9.346090 2.830000 -5.980957 c
1.170000 -5.980957 l
h
f
n
Q
q
0.000000 -1.000000 1.000000 0.000000 20.980957 22.000000 cm
0.000000 0.000000 0.000000 scn
0.000000 3.519043 m
-0.686377 3.052367 -0.686606 3.052704 -0.686827 3.053029 c
-0.686890 3.053123 -0.687103 3.053437 -0.687230 3.053624 c
-0.687484 3.053999 -0.687707 3.054330 -0.687901 3.054617 c
-0.688287 3.055190 -0.688552 3.055586 -0.688699 3.055805 c
-0.688991 3.056243 -0.688808 3.055973 -0.688163 3.054991 c
-0.686874 3.053027 -0.683741 3.048217 -0.678884 3.040542 c
-0.669169 3.025192 -0.652556 2.998377 -0.630008 2.959931 c
-0.584915 2.883047 -0.516061 2.759615 -0.431147 2.588317 c
-0.261366 2.245815 -0.027114 1.711416 0.209833 0.974417 c
0.683340 -0.498374 1.170000 -2.787649 1.170000 -5.980957 c
2.830000 -5.980957 l
2.830000 -2.615824 2.316660 -0.155099 1.790166 1.482499 c
1.527114 2.300695 1.261366 2.911589 1.056147 3.325581 c
0.953561 3.532529 0.866165 3.690144 0.801883 3.799746 c
0.769744 3.854543 0.743388 3.897330 0.723805 3.928271 c
0.714015 3.943742 0.705917 3.956251 0.699638 3.965818 c
0.696498 3.970602 0.693813 3.974651 0.691598 3.977967 c
0.690490 3.979625 0.689500 3.981099 0.688629 3.982391 c
0.688194 3.983037 0.687788 3.983638 0.687413 3.984192 c
0.687225 3.984469 0.686966 3.984851 0.686872 3.984990 c
0.686621 3.985360 0.686377 3.985719 0.000000 3.519043 c
h
1.170000 -5.980957 m
1.170000 -9.174265 0.683340 -11.463540 0.209833 -12.936331 c
-0.027114 -13.673330 -0.261366 -14.207729 -0.431147 -14.550232 c
-0.516061 -14.721529 -0.584915 -14.844961 -0.630008 -14.921844 c
-0.652556 -14.960291 -0.669169 -14.987106 -0.678884 -15.002457 c
-0.683741 -15.010132 -0.686874 -15.014940 -0.688163 -15.016905 c
-0.688808 -15.017887 -0.688991 -15.018158 -0.688699 -15.017719 c
-0.688552 -15.017500 -0.688287 -15.017103 -0.687901 -15.016531 c
-0.687707 -15.016245 -0.687484 -15.015913 -0.687230 -15.015539 c
-0.687103 -15.015350 -0.686890 -15.015036 -0.686827 -15.014942 c
-0.686606 -15.014618 -0.686377 -15.014280 0.000000 -15.480957 c
0.686377 -15.947634 0.686621 -15.947273 0.686872 -15.946903 c
0.686966 -15.946766 0.687225 -15.946383 0.687413 -15.946106 c
0.687788 -15.945551 0.688194 -15.944952 0.688629 -15.944305 c
0.689500 -15.943014 0.690490 -15.941538 0.691598 -15.939880 c
0.693813 -15.936565 0.696498 -15.932516 0.699638 -15.927732 c
0.705917 -15.918165 0.714015 -15.905657 0.723805 -15.890184 c
0.743388 -15.859243 0.769744 -15.816458 0.801883 -15.761660 c
0.866165 -15.652058 0.953561 -15.494444 1.056147 -15.287495 c
1.261366 -14.873503 1.527114 -14.262609 1.790166 -13.444414 c
2.316660 -11.806815 2.830000 -9.346090 2.830000 -5.980957 c
1.170000 -5.980957 l
h
f
n
Q
endstream
endobj
3 0 obj
7785
endobj
4 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 30.000000 30.000000 ]
/Resources 1 0 R
/Contents 2 0 R
/Parent 5 0 R
>>
endobj
5 0 obj
<< /Kids [ 4 0 R ]
/Count 1
/Type /Pages
>>
endobj
6 0 obj
<< /Pages 5 0 R
/Type /Catalog
>>
endobj
xref
0 7
0000000000 65535 f
0000000010 00000 n
0000000034 00000 n
0000007875 00000 n
0000007898 00000 n
0000008071 00000 n
0000008145 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 6 0 R
/Size 7
>>
startxref
8204
%%EOF

View File

@ -1,12 +1,15 @@
{
"images" : [
{
"filename" : "ic_search.pdf",
"filename" : "search_24.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View File

@ -1,82 +0,0 @@
%PDF-1.7
1 0 obj
<< >>
endobj
2 0 obj
<< /Length 3 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 4.999991 4.221268 cm
0.000000 0.000000 0.000000 scn
2.000000 12.278740 m
2.000000 15.868591 4.910149 18.778740 8.500000 18.778740 c
12.089850 18.778740 15.000000 15.868591 15.000000 12.278740 c
15.000000 8.688890 12.089850 5.778740 8.500000 5.778740 c
4.910149 5.778740 2.000000 8.688890 2.000000 12.278740 c
h
8.500000 20.778740 m
3.805580 20.778740 0.000000 16.973160 0.000000 12.278740 c
0.000000 7.584319 3.805580 3.778740 8.500000 3.778740 c
10.427133 3.778740 12.204475 4.420067 13.630243 5.500938 c
18.676220 0.454960 l
19.131182 0.000000 19.868818 0.000000 20.323780 0.454960 c
20.778740 0.909922 20.778740 1.647558 20.323780 2.102520 c
15.277802 7.148497 l
16.358673 8.574265 17.000000 10.351607 17.000000 12.278740 c
17.000000 16.973160 13.194421 20.778740 8.500000 20.778740 c
h
f*
n
Q
endstream
endobj
3 0 obj
864
endobj
4 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 30.000000 30.000000 ]
/Resources 1 0 R
/Contents 2 0 R
/Parent 5 0 R
>>
endobj
5 0 obj
<< /Kids [ 4 0 R ]
/Count 1
/Type /Pages
>>
endobj
6 0 obj
<< /Pages 5 0 R
/Type /Catalog
>>
endobj
xref
0 7
0000000000 65535 f
0000000010 00000 n
0000000034 00000 n
0000000954 00000 n
0000000976 00000 n
0000001149 00000 n
0000001223 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 6 0 R
/Size 7
>>
startxref
1282
%%EOF

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.62997 10.8C5.62997 7.94466 7.94466 5.62997 10.8 5.62997C13.6553 5.62997 15.97 7.94466 15.97 10.8C15.97 13.6553 13.6553 15.97 10.8 15.97C7.94466 15.97 5.62997 13.6553 5.62997 10.8ZM10.8 3.96997C7.02787 3.96997 3.96997 7.02787 3.96997 10.8C3.96997 14.5721 7.02787 17.63 10.8 17.63C12.3869 17.63 13.8474 17.0888 15.007 16.1808L19.0131 20.1869C19.3372 20.511 19.8627 20.511 20.1869 20.1869C20.511 19.8627 20.511 19.3372 20.1869 19.0131L16.1808 15.007C17.0888 13.8474 17.63 12.3869 17.63 10.8C17.63 7.02787 14.5721 3.96997 10.8 3.96997Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 703 B

View File

@ -8,5 +8,8 @@
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View File

@ -1,12 +1,15 @@
{
"images" : [
{
"filename" : "ic_stickers.pdf",
"filename" : "stickers_24.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View File

@ -1,431 +0,0 @@
%PDF-1.7
1 0 obj
<< >>
endobj
2 0 obj
<< /Length 3 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 4.000000 2.336044 cm
0.000000 0.000000 0.000000 scn
12.629680 1.768461 m
12.783916 0.952917 l
12.629680 1.768461 l
h
16.593809 4.257765 m
17.180708 3.670866 l
16.593809 4.257765 l
h
14.895066 2.706814 m
14.427451 3.392551 l
14.895066 2.706814 l
h
21.895494 11.034276 m
22.711039 10.880039 l
21.895494 11.034276 l
h
19.406189 7.070145 m
18.819290 7.657043 l
19.406189 7.070145 l
h
20.957142 8.768889 m
20.271404 9.236505 l
20.957142 8.768889 l
h
0.483443 6.107693 m
-0.289235 5.804592 l
0.483443 6.107693 l
h
4.443737 2.147398 m
4.140636 1.374722 l
4.443737 2.147398 l
h
21.516558 19.220219 m
22.289234 19.523319 l
21.516558 19.220219 l
h
3.962814 22.970737 m
3.602690 23.718542 l
3.962814 22.970737 l
h
0.693218 19.701141 m
-0.054586 20.061266 l
0.693218 19.701141 l
h
11.000000 22.833956 m
11.668203 22.833956 l
11.668203 24.493956 l
11.000000 24.493956 l
11.000000 22.833956 l
h
0.830000 11.995752 m
0.830000 12.663956 l
-0.830000 12.663956 l
-0.830000 11.995752 l
0.830000 11.995752 l
h
18.819290 7.657043 m
16.006910 4.844664 l
17.180708 3.670866 l
19.993088 6.483246 l
18.819290 7.657043 l
h
10.331797 0.833956 m
11.464174 0.833956 12.137112 0.830593 12.783916 0.952917 c
12.475444 2.584003 l
12.017082 2.497318 11.526485 2.493956 10.331797 2.493956 c
10.331797 0.833956 l
h
16.006910 4.844664 m
15.162139 3.999891 14.812858 3.655367 14.427451 3.392551 c
15.362681 2.021076 l
15.906537 2.391941 16.379997 2.870155 17.180708 3.670866 c
16.006910 4.844664 l
h
12.783916 0.952917 m
13.707870 1.127657 14.585788 1.491302 15.362681 2.021076 c
14.427451 3.392551 l
13.839379 2.991537 13.174834 2.716274 12.475444 2.584003 c
12.783916 0.952917 l
h
21.170000 13.332159 m
21.170000 12.137469 21.166637 11.646873 21.079952 11.188512 c
22.711039 10.880039 l
22.833363 11.526844 22.830000 12.199781 22.830000 13.332159 c
21.170000 13.332159 l
h
19.993088 6.483246 m
20.793798 7.283958 21.272015 7.757419 21.642879 8.301274 c
20.271404 9.236505 l
20.008589 8.851098 19.664062 8.501816 18.819290 7.657043 c
19.993088 6.483246 l
h
21.079952 11.188512 m
20.947681 10.489121 20.672419 9.824576 20.271404 9.236505 c
21.642879 8.301274 l
22.172653 9.078168 22.536299 9.956086 22.711039 10.880039 c
21.079952 11.188512 l
h
-0.830000 11.995752 m
-0.830000 10.454670 -0.830408 9.259295 -0.767823 8.296148 c
-0.704785 7.326029 -0.575355 6.533985 -0.289235 5.804592 c
1.256120 6.410791 l
1.058798 6.913816 0.946507 7.513920 0.888684 8.403788 c
0.830408 9.300627 0.830000 10.433072 0.830000 11.995752 c
-0.830000 11.995752 l
h
10.331797 2.493956 m
8.769116 2.493956 7.636671 2.494364 6.739831 2.552639 c
5.849965 2.610462 5.249860 2.722754 4.746836 2.920076 c
4.140636 1.374722 l
4.870029 1.088600 5.662074 0.959171 6.632193 0.896133 c
7.595339 0.833548 8.790714 0.833956 10.331797 0.833956 c
10.331797 2.493956 l
h
-0.289235 5.804592 m
0.506586 3.775846 2.111891 2.170542 4.140636 1.374722 c
4.746836 2.920076 l
3.148195 3.547178 1.883223 4.812151 1.256120 6.410791 c
-0.289235 5.804592 l
h
11.668203 22.833956 m
13.230883 22.833956 14.363329 22.833548 15.260168 22.775272 c
16.150036 22.717449 16.750139 22.605158 17.253164 22.407835 c
17.859364 23.953190 l
17.129971 24.239311 16.337927 24.368740 15.367807 24.431778 c
14.404661 24.494364 13.209285 24.493956 11.668203 24.493956 c
11.668203 22.833956 l
h
22.830000 13.332159 m
22.830000 14.873241 22.830408 16.068617 22.767822 17.031763 c
22.704784 18.001881 22.575356 18.793926 22.289234 19.523319 c
20.743879 18.917120 l
20.941202 18.414095 21.053493 17.813992 21.111317 16.924124 c
21.169592 16.027285 21.170000 14.894838 21.170000 13.332159 c
22.830000 13.332159 l
h
17.253164 22.407835 m
18.851805 21.780733 20.116777 20.515760 20.743879 18.917120 c
22.289234 19.523319 l
21.493414 21.552065 19.888109 23.157370 17.859364 23.953190 c
17.253164 22.407835 l
h
11.000000 24.493956 m
9.147122 24.493956 7.709934 24.494541 6.557355 24.404799 c
5.395766 24.314354 4.453906 24.128466 3.602690 23.718542 c
4.322937 22.222933 l
4.911203 22.506227 5.622035 22.666948 6.686217 22.749807 c
7.759411 22.833370 9.121075 22.833956 11.000000 22.833956 c
11.000000 24.493956 l
h
0.830000 12.663956 m
0.830000 14.542881 0.830586 15.904545 0.914148 16.977737 c
0.997008 18.041920 1.157728 18.752752 1.441022 19.341019 c
-0.054586 20.061266 l
-0.464510 19.210049 -0.650399 18.268190 -0.740843 17.106600 c
-0.830586 15.954021 -0.830000 14.516833 -0.830000 12.663956 c
0.830000 12.663956 l
h
3.602690 23.718542 m
2.004527 22.948908 0.715049 21.659428 -0.054586 20.061266 c
1.441022 19.341019 l
2.047490 20.600363 3.063593 21.616465 4.322937 22.222933 c
3.602690 23.718542 l
h
f
n
Q
q
1.000000 0.000000 -0.000000 1.000000 14.000000 3.169342 cm
0.000000 0.000000 0.000000 scn
2.895337 1.513170 m
2.155802 1.889982 l
2.895337 1.513170 l
h
2.349067 0.966900 m
2.725879 0.227365 l
2.349067 0.966900 l
h
4.396603 9.526595 m
4.019791 10.266130 l
4.396603 9.526595 l
h
3.304063 8.434055 m
2.564527 8.810867 l
3.304063 8.434055 l
h
11.863758 10.481591 m
11.124223 10.858403 l
11.863758 10.481591 l
h
11.317488 9.935321 m
11.694300 9.195786 l
11.317488 9.935321 l
h
11.170000 12.830658 m
11.170000 11.799080 l
12.830000 11.799080 l
12.830000 12.830658 l
11.170000 12.830658 l
h
10.000000 10.629079 m
7.031581 10.629079 l
7.031581 8.969079 l
10.000000 8.969079 l
10.000000 10.629079 l
h
2.201579 5.799079 m
2.201579 2.830659 l
3.861579 2.830659 l
3.861579 5.799079 l
2.201579 5.799079 l
h
1.031579 1.660658 m
0.000000 1.660658 l
0.000000 0.000658 l
1.031579 0.000658 l
1.031579 1.660658 l
h
2.201579 2.830659 m
2.201579 2.466930 2.200933 2.244051 2.187305 2.077250 c
2.180954 1.999516 2.172969 1.952377 2.166202 1.923643 c
2.162982 1.909968 2.160270 1.901502 2.158613 1.896861 c
2.157021 1.892399 2.156040 1.890450 2.155802 1.889982 c
3.634872 1.136358 l
3.772548 1.406561 3.820568 1.682304 3.841792 1.942073 c
3.862224 2.192151 3.861579 2.494322 3.861579 2.830659 c
2.201579 2.830659 l
h
1.031579 0.000658 m
1.367916 0.000658 1.670086 0.000012 1.920165 0.020445 c
2.179933 0.041669 2.455676 0.089689 2.725879 0.227365 c
1.972255 1.706435 l
1.971787 1.706197 1.969838 1.705216 1.965376 1.703624 c
1.960735 1.701967 1.952269 1.699255 1.938594 1.696035 c
1.909860 1.689268 1.862720 1.681283 1.784988 1.674932 c
1.618186 1.661304 1.395307 1.660658 1.031579 1.660658 c
1.031579 0.000658 l
h
2.155802 1.889982 m
2.115535 1.810954 2.051283 1.746702 1.972255 1.706435 c
2.725879 0.227365 l
3.117256 0.426782 3.435456 0.744981 3.634872 1.136358 c
2.155802 1.889982 l
h
7.031581 10.629079 m
6.345211 10.629079 5.780515 10.629725 5.321996 10.592262 c
4.853787 10.554008 4.423688 10.471928 4.019791 10.266130 c
4.773415 8.787060 l
4.904296 8.853747 5.091620 8.907908 5.457173 8.937775 c
5.832415 8.968433 6.317819 8.969079 7.031581 8.969079 c
7.031581 10.629079 l
h
3.861579 5.799079 m
3.861579 6.512841 3.862224 6.998244 3.892883 7.373486 c
3.922750 7.739038 3.976911 7.926362 4.043598 8.057243 c
2.564527 8.810867 l
2.358731 8.406969 2.276650 7.976871 2.238396 7.508663 c
2.200933 7.050144 2.201579 6.485449 2.201579 5.799079 c
3.861579 5.799079 l
h
4.019791 10.266130 m
3.393211 9.946873 2.883785 9.437447 2.564527 8.810867 c
4.043598 8.057243 l
4.203707 8.371473 4.459184 8.626951 4.773415 8.787060 c
4.019791 10.266130 l
h
11.170000 11.799080 m
11.170000 11.435350 11.169354 11.212472 11.155726 11.045670 c
11.149375 10.967937 11.141390 10.920798 11.134623 10.892064 c
11.131403 10.878389 11.128691 10.869923 11.127034 10.865282 c
11.125442 10.860820 11.124461 10.858871 11.124223 10.858403 c
12.603293 10.104778 l
12.740969 10.374982 12.788989 10.650725 12.810213 10.910493 c
12.830646 11.160572 12.830000 11.462742 12.830000 11.799080 c
11.170000 11.799080 l
h
10.000000 8.969079 m
10.336337 8.969079 10.638507 8.968433 10.888586 8.988866 c
11.148354 9.010090 11.424097 9.058110 11.694300 9.195786 c
10.940676 10.674856 l
10.940208 10.674618 10.938259 10.673637 10.933797 10.672045 c
10.929156 10.670388 10.920690 10.667677 10.907015 10.664455 c
10.878281 10.657689 10.831141 10.649704 10.753409 10.643353 c
10.586607 10.629725 10.363729 10.629079 10.000000 10.629079 c
10.000000 8.969079 l
h
11.124223 10.858403 m
11.083956 10.779375 11.019704 10.715123 10.940676 10.674856 c
11.694300 9.195786 l
12.085677 9.395203 12.403876 9.713402 12.603293 10.104778 c
11.124223 10.858403 l
h
f
n
Q
q
1.000000 0.000000 -0.000000 1.000000 10.000000 16.250000 cm
0.000000 0.000000 0.000000 scn
3.000000 1.750000 m
3.000000 0.783502 2.328427 0.000000 1.500000 0.000000 c
0.671573 0.000000 0.000000 0.783502 0.000000 1.750000 c
0.000000 2.716498 0.671573 3.500000 1.500000 3.500000 c
2.328427 3.500000 3.000000 2.716498 3.000000 1.750000 c
h
f
n
Q
q
1.000000 0.000000 -0.000000 1.000000 17.000000 16.250000 cm
0.000000 0.000000 0.000000 scn
3.000000 1.750000 m
3.000000 0.783502 2.328427 0.000000 1.500000 0.000000 c
0.671573 0.000000 0.000000 0.783502 0.000000 1.750000 c
0.000000 2.716498 0.671573 3.500000 1.500000 3.500000 c
2.328427 3.500000 3.000000 2.716498 3.000000 1.750000 c
h
f
n
Q
q
1.000000 0.000000 -0.000000 1.000000 11.000000 8.230942 cm
0.000000 0.000000 0.000000 scn
0.664000 4.267058 m
0.388962 4.633775 -0.131283 4.708096 -0.498000 4.433058 c
-0.864717 4.158020 -0.939038 3.637775 -0.664000 3.271058 c
0.664000 4.267058 l
h
4.000000 1.769054 m
3.999999 0.939054 l
4.000000 0.939054 l
4.000000 1.769054 l
h
6.332036 1.389412 m
6.752154 1.572791 6.944070 2.062022 6.760692 2.482140 c
6.577314 2.902259 6.088083 3.094175 5.667964 2.910796 c
6.332036 1.389412 l
h
0.000000 3.769058 m
-0.664000 3.271058 -0.663799 3.270791 -0.663593 3.270516 c
-0.663516 3.270414 -0.663304 3.270131 -0.663150 3.269927 c
-0.662843 3.269519 -0.662512 3.269080 -0.662157 3.268610 c
-0.661448 3.267670 -0.660643 3.266607 -0.659743 3.265423 c
-0.657943 3.263054 -0.655763 3.260200 -0.653203 3.256877 c
-0.648084 3.250230 -0.641445 3.241700 -0.633302 3.231414 c
-0.617020 3.210848 -0.594689 3.183217 -0.566423 3.149538 c
-0.509945 3.082245 -0.429440 2.990409 -0.325813 2.882277 c
-0.119243 2.666726 0.183137 2.382302 0.574317 2.097807 c
1.353481 1.531142 2.521308 0.939057 3.999999 0.939054 c
4.000001 2.599054 l
2.978692 2.599056 2.146519 3.006973 1.550683 3.440309 c
1.254363 3.655814 1.025493 3.871391 0.872688 4.030839 c
0.796627 4.110207 0.740414 4.174622 0.705095 4.216704 c
0.687462 4.237712 0.675126 4.253050 0.668214 4.261781 c
0.664761 4.266143 0.662671 4.268843 0.661961 4.269765 c
0.661607 4.270226 0.661598 4.270240 0.661937 4.269794 c
0.662106 4.269571 0.662363 4.269233 0.662706 4.268778 c
0.662878 4.268550 0.663072 4.268293 0.663288 4.268007 c
0.663395 4.267863 0.663574 4.267626 0.663627 4.267555 c
0.663811 4.267310 0.664000 4.267058 0.000000 3.769058 c
h
4.000000 0.939054 m
4.844985 0.939054 5.627935 1.082078 6.332036 1.389412 c
5.667964 2.910796 l
5.208086 2.710063 4.657703 2.599054 4.000000 2.599054 c
4.000000 0.939054 l
h
f
n
Q
endstream
endobj
3 0 obj
10900
endobj
4 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 30.000000 30.000000 ]
/Resources 1 0 R
/Contents 2 0 R
/Parent 5 0 R
>>
endobj
5 0 obj
<< /Kids [ 4 0 R ]
/Count 1
/Type /Pages
>>
endobj
6 0 obj
<< /Pages 5 0 R
/Type /Catalog
>>
endobj
xref
0 7
0000000000 65535 f
0000000010 00000 n
0000000034 00000 n
0000010990 00000 n
0000011014 00000 n
0000011187 00000 n
0000011261 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 6 0 R
/Size 7
>>
startxref
11320
%%EOF

View File

@ -0,0 +1,7 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.5132 3H11.96C8.82371 3 7.25556 3 6.05765 3.61036C5.00395 4.14725 4.14725 5.00395 3.61036 6.05765C3 7.25556 3 8.82371 3 11.96V12.5132C3 15.204 3 16.5494 3.45276 17.6059C4.01919 18.9276 5.07238 19.9808 6.39413 20.5472C7.4506 21 8.79601 21 11.4868 21C12.4951 21 12.9993 21 13.4769 20.902C14.0751 20.7792 14.6443 20.5434 15.1542 20.2072C15.5612 19.9388 15.9177 19.5823 16.6306 18.8694L18.8694 16.6306C19.5823 15.9177 19.9388 15.5612 20.2072 15.1542C20.5434 14.6443 20.7792 14.0751 20.902 13.4769C21 12.9993 21 12.4951 21 11.4868C21 8.79601 21 7.4506 20.5472 6.39413C19.9808 5.07238 18.9276 4.01919 17.6059 3.45276C16.5494 3 15.204 3 12.5132 3Z" stroke="black" stroke-width="1.66"/>
<path d="M21 11V11.8253C21 12.3853 21 12.6653 20.891 12.8793C20.7951 13.0674 20.6422 13.2204 20.454 13.3163C20.2401 13.4253 19.9601 13.4253 19.4 13.4253H16.6253C15.5052 13.4253 14.9451 13.4253 14.5173 13.6433C14.141 13.835 13.835 14.141 13.6433 14.5173C13.4253 14.9451 13.4253 15.5052 13.4253 16.6253V19.4C13.4253 19.96 13.4253 20.24 13.3163 20.454C13.2204 20.6421 13.0674 20.7951 12.8793 20.891C12.6653 21 12.3853 21 11.8253 21H11" stroke="black" stroke-width="1.66"/>
<ellipse cx="9.2" cy="9.59995" rx="1.2" ry="1.4" fill="black" stroke="black" stroke-width="0.33"/>
<ellipse cx="14.7996" cy="9.60019" rx="1.2" ry="1.4" fill="black" stroke="black" stroke-width="0.33"/>
<path d="M8.80078 14.4004C8.80078 14.4004 10.0008 16.0004 12.0008 16.0004C12.4627 16.0004 12.8846 15.9404 13.2665 15.8204" stroke="black" stroke-width="1.66" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "trending_24.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.9992 3.6302C7.3766 3.6302 3.62922 7.37757 3.62922 12.0002C3.62922 16.6228 7.3766 20.3702 11.9992 20.3702C16.6218 20.3702 20.3692 16.6228 20.3692 12.0002C20.3692 7.37757 16.6218 3.6302 11.9992 3.6302ZM1.96922 12.0002C1.96922 6.46078 6.4598 1.9702 11.9992 1.9702C17.5386 1.9702 22.0292 6.46078 22.0292 12.0002C22.0292 17.5396 17.5386 22.0302 11.9992 22.0302C6.4598 22.0302 1.96922 17.5396 1.96922 12.0002ZM11.9992 7.1702C12.4576 7.1702 12.8292 7.5418 12.8292 8.0002V11.1702H15.9992C16.4576 11.1702 16.8292 11.5418 16.8292 12.0002C16.8292 12.4586 16.4576 12.8302 15.9992 12.8302H12.8292V16.0002C12.8292 16.4586 12.4576 16.8302 11.9992 16.8302C11.5408 16.8302 11.1692 16.4586 11.1692 16.0002V12.8302H7.99922C7.54082 12.8302 7.16922 12.4586 7.16922 12.0002C7.16922 11.5418 7.54082 11.1702 7.99922 11.1702H11.1692V8.0002C11.1692 7.5418 11.5408 7.1702 11.9992 7.1702Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "recent_24.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.62922 12.0002C3.62922 7.37757 7.3766 3.6302 11.9992 3.6302C16.6218 3.6302 20.3692 7.37757 20.3692 12.0002C20.3692 16.6228 16.6218 20.3702 11.9992 20.3702C7.3766 20.3702 3.62922 16.6228 3.62922 12.0002ZM11.9992 1.9702C6.4598 1.9702 1.96922 6.46078 1.96922 12.0002C1.96922 17.5396 6.4598 22.0302 11.9992 22.0302C17.5386 22.0302 22.0292 17.5396 22.0292 12.0002C22.0292 6.46078 17.5386 1.9702 11.9992 1.9702ZM12.8292 6.4002C12.8292 5.9418 12.4576 5.5702 11.9992 5.5702C11.5408 5.5702 11.1692 5.9418 11.1692 6.4002V11.6439C11.1692 12.106 11.3653 12.5464 11.7088 12.8555L15.444 16.2171C15.7847 16.5238 16.3095 16.4962 16.6162 16.1554C16.9228 15.8147 16.8952 15.2899 16.5545 14.9833L12.8292 11.6305V6.4002Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 871 B

View File

@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "favourites_24.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.32031 8.32019C4.32031 6.52803 4.32031 5.63194 4.66909 4.94743C4.97589 4.34531 5.46542 3.85577 6.06754 3.54897C6.75206 3.2002 7.64814 3.2002 9.44031 3.2002H14.5603C16.3525 3.2002 17.2486 3.2002 17.9331 3.54897C18.5352 3.85577 19.0247 4.34531 19.3315 4.94743C19.6803 5.63194 19.6803 6.52803 19.6803 8.3202V18.3663C19.6803 19.656 19.6803 20.3008 19.4165 20.6298C19.187 20.9159 18.8394 21.0813 18.4727 21.079C18.0509 21.0763 17.5505 20.6697 16.5496 19.8565L13.0093 16.98C12.6496 16.6877 12.4698 16.5416 12.2699 16.4857C12.0936 16.4363 11.9071 16.4363 11.7308 16.4857C11.5308 16.5416 11.351 16.6877 10.9914 16.98L7.45105 19.8565C6.45015 20.6697 5.9497 21.0763 5.52797 21.079C5.16125 21.0813 4.8136 20.9159 4.58416 20.6298C4.32031 20.3008 4.32031 19.656 4.32031 18.3663L4.32031 8.32019Z" stroke="black" stroke-width="1.66" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 997 B

View File

@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "trendinggifs_24.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.9988 3.63078C7.3762 3.63078 3.62883 7.37816 3.62883 12.0008C3.62883 16.6234 7.3762 20.3708 11.9988 20.3708C16.156 20.3708 19.6068 17.3392 20.2581 13.3662C20.3323 12.9138 20.7591 12.6073 21.2115 12.6814C21.6638 12.7556 21.9704 13.1824 21.8963 13.6348C21.1155 18.3972 16.9823 22.0308 11.9988 22.0308C6.45941 22.0308 1.96883 17.5402 1.96883 12.0008C1.96883 6.46137 6.45941 1.97078 11.9988 1.97078C13.143 1.97078 14.2441 2.1627 15.2706 2.51677C15.704 2.66624 15.9341 3.13871 15.7846 3.57205C15.6352 4.00539 15.1627 4.23552 14.7294 4.08605C13.8746 3.79123 12.9563 3.63078 11.9988 3.63078ZM19.0612 6.83L14.9442 11.7704L12.5869 9.4131C12.2628 9.08897 11.7372 9.08897 11.4131 9.4131L6.4131 14.4131C6.08897 14.7372 6.08897 15.2628 6.4131 15.5869C6.73724 15.911 7.26276 15.911 7.5869 15.5869L12 11.1738L14.4131 13.5869C14.578 13.7518 14.8047 13.8397 15.0376 13.8291C15.2706 13.8186 15.4883 13.7105 15.6376 13.5314L20.17 8.0925V10C20.17 10.4584 20.5416 10.83 21 10.83C21.4584 10.83 21.83 10.4584 21.83 10V6C21.83 5.5416 21.4584 5.17 21 5.17H17C16.5416 5.17 16.17 5.5416 16.17 6C16.17 6.4584 16.5416 6.83 17 6.83H19.0612Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1604,7 +1604,7 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
var apparentInputBackgroundFrame = inputBackgroundFrame
var apparentNavigateButtonsFrame = navigateButtonsFrame
if case let .media(_, maybeExpanded, _) = self.chatPresentationInterfaceState.inputMode, let expanded = maybeExpanded, case .search = expanded, let inputPanelFrame = inputPanelFrame {
let verticalOffset = -inputPanelFrame.height - 41.0
let verticalOffset = -inputPanelFrame.height - 34.0
apparentInputPanelFrame = inputPanelFrame.offsetBy(dx: 0.0, dy: verticalOffset)
apparentInputBackgroundFrame.size.height -= verticalOffset
apparentInputBackgroundFrame.origin.y += verticalOffset

View File

@ -956,7 +956,7 @@ final class ChatEntityKeyboardInputNode: ChatInputNode {
super.init()
self.topBackgroundExtension = 41.0
self.topBackgroundExtension = 34.0
self.followsDefaultHeight = true
self.view.addSubview(self.entityKeyboardView)
@ -1036,6 +1036,8 @@ final class ChatEntityKeyboardInputNode: ChatInputNode {
},
openStickerSettings: {
},
openFeatured: {
},
addGroupAction: { [weak self, weak controllerInteraction] groupId, isPremiumLocked in
guard let controllerInteraction = controllerInteraction, let collectionId = groupId.base as? ItemCollectionId else {
return
@ -1180,6 +1182,22 @@ final class ChatEntityKeyboardInputNode: ChatInputNode {
controller.navigationPresentation = .modal
controllerInteraction.navigationController()?.pushViewController(controller)
},
openFeatured: { [weak controllerInteraction] in
guard let controllerInteraction = controllerInteraction else {
return
}
controllerInteraction.navigationController()?.pushViewController(FeaturedStickersScreen(
context: context,
highlightedPackId: nil,
sendSticker: { [weak controllerInteraction] fileReference, sourceNode, sourceRect in
guard let controllerInteraction = controllerInteraction else {
return false
}
return controllerInteraction.sendSticker(fileReference, false, false, nil, false, sourceNode, sourceRect, nil)
}
))
},
addGroupAction: { groupId, isPremiumLocked in
guard let controllerInteraction = controllerInteraction, let collectionId = groupId.base as? ItemCollectionId else {
return
@ -1492,7 +1510,7 @@ final class ChatEntityKeyboardInputNode: ChatInputNode {
transition: mappedTransition,
component: AnyComponent(EntityKeyboardComponent(
theme: interfaceState.theme,
bottomInset: bottomInset,
containerInsets: UIEdgeInsets(top: 0.0, left: leftInset, bottom: bottomInset, right: rightInset),
emojiContent: self.currentInputData.emoji,
stickerContent: stickerContent,
gifContent: gifContent?.component,
@ -1841,6 +1859,8 @@ final class EntityInputView: UIView, AttachmentTextInputPanelInputView, UIInputV
},
openStickerSettings: {
},
openFeatured: {
},
addGroupAction: { _, _ in
},
clearGroup: { _ in

View File

@ -281,7 +281,7 @@ private func textInputBackgroundImage(backgroundColor: UIColor?, inputBackground
context.setBlendMode(.normal)
context.setStrokeColor(strokeColor.cgColor)
let strokeWidth: CGFloat = 1.0
let strokeWidth: CGFloat = UIScreenPixel
context.setLineWidth(strokeWidth)
context.strokeEllipse(in: CGRect(x: strokeWidth / 2.0, y: strokeWidth / 2.0, width: diameter - strokeWidth, height: diameter - strokeWidth))
})?.stretchableImage(withLeftCapWidth: Int(diameter) / 2, topCapHeight: Int(diameter) / 2)

View File

@ -111,18 +111,22 @@ private final class EffectImageLayer: SimpleLayer, GradientBackgroundPatternOver
private func updateFilters() {
let useSoftlight: Bool
let useFilter: Bool
switch self.softlightMode {
case .whileAnimating:
useSoftlight = self.isAnimating
useFilter = useSoftlight
case .always:
useSoftlight = true
useFilter = useSoftlight
case .never:
useSoftlight = false
useSoftlight = true
useFilter = false
}
if self.isUsingSoftlight != useSoftlight {
self.isUsingSoftlight = useSoftlight
if self.isUsingSoftlight {
if self.isUsingSoftlight && useFilter {
self.compositingFilter = "softLightBlendMode"
} else {
self.compositingFilter = nil
@ -191,18 +195,18 @@ private final class EffectImageLayer: SimpleLayer, GradientBackgroundPatternOver
private static var cachedComposedImage: (size: CGSize, patternContentImage: UIImage, backgroundImageHash: String, image: UIImage)?
private func updateComposedImage() {
if self.suspendCompositionUpdates {
self.needsCompositionUpdate = true
return
}
switch self.softlightMode {
case .always:
case .always, .never:
return
default:
break
}
if self.suspendCompositionUpdates {
self.needsCompositionUpdate = true
return
}
guard let (size, backgroundImage, backgroundImageHash) = self.compositionData, let patternContentImage = self.patternContentImage else {
return
}
@ -840,7 +844,7 @@ final class WallpaperBackgroundNodeImpl: ASDisplayNode, WallpaperBackgroundNode
if self.patternImageLayer.contents != nil {
self.patternImageLayer.backgroundColor = nil
} else {
self.patternImageLayer.backgroundColor = UIColor.black.cgColor
self.patternImageLayer.backgroundColor = nil
}
} else {
self.backgroundColor = nil