mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-07 13:35:09 +00:00
Merge commit 'f01d5d1546901becf39623e0bfb9d0452187e9a3'
This commit is contained in:
@@ -1079,6 +1079,19 @@
|
||||
<key>explicitFileType</key>
|
||||
<string>archive.ar</string>
|
||||
</dict>
|
||||
<key>1DD70E2957B5522500000000</key>
|
||||
<dict>
|
||||
<key>isa</key>
|
||||
<string>PBXFileReference</string>
|
||||
<key>name</key>
|
||||
<string>libSegmentedControlNode.a</string>
|
||||
<key>path</key>
|
||||
<string>libSegmentedControlNode.a</string>
|
||||
<key>sourceTree</key>
|
||||
<string>BUILT_PRODUCTS_DIR</string>
|
||||
<key>explicitFileType</key>
|
||||
<string>archive.ar</string>
|
||||
</dict>
|
||||
<key>1DD70E29097DBE9200000000</key>
|
||||
<dict>
|
||||
<key>isa</key>
|
||||
@@ -1582,6 +1595,7 @@
|
||||
<string>1DD70E29CF967D4300000000</string>
|
||||
<string>1DD70E29EA9CBB5B00000000</string>
|
||||
<string>1DD70E291328E99400000000</string>
|
||||
<string>1DD70E2957B5522500000000</string>
|
||||
<string>1DD70E29097DBE9200000000</string>
|
||||
<string>1DD70E2981AE180900000000</string>
|
||||
<string>1DD70E29524F478E00000000</string>
|
||||
@@ -4159,6 +4173,13 @@
|
||||
<key>fileRef</key>
|
||||
<string>1DD70E29CBE117ED00000000</string>
|
||||
</dict>
|
||||
<key>E7A30F0457B5522500000000</key>
|
||||
<dict>
|
||||
<key>isa</key>
|
||||
<string>PBXBuildFile</string>
|
||||
<key>fileRef</key>
|
||||
<string>1DD70E2957B5522500000000</string>
|
||||
</dict>
|
||||
<key>E7A30F0425BBFEEE00000000</key>
|
||||
<dict>
|
||||
<key>isa</key>
|
||||
@@ -4766,6 +4787,7 @@
|
||||
<string>E7A30F0497B4D6D800000000</string>
|
||||
<string>E7A30F04C37F741500000000</string>
|
||||
<string>E7A30F04CBE117ED00000000</string>
|
||||
<string>E7A30F0457B5522500000000</string>
|
||||
<string>E7A30F0425BBFEEE00000000</string>
|
||||
<string>E7A30F045A26607D00000000</string>
|
||||
<string>E7A30F042417E0B200000000</string>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
/* Begin PBXBuildFile section */
|
||||
091EABA5231DAC7500A0EC14 /* ThemeNameGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 091EABA4231DAC7500A0EC14 /* ThemeNameGenerator.swift */; };
|
||||
09B4A9B823102B7A005C2E08 /* EditThemeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09B4A9B723102B7A005C2E08 /* EditThemeController.swift */; };
|
||||
09CE5B8E2322154400743FF4 /* SegmentedControlNode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09CE5B8D2322154400743FF4 /* SegmentedControlNode.framework */; };
|
||||
D03E465223075D930049C28B /* SettingsUI.h in Headers */ = {isa = PBXBuildFile; fileRef = D03E465023075D930049C28B /* SettingsUI.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D03E466823075E660049C28B /* TabBarAccountSwitchControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E465C23075E630049C28B /* TabBarAccountSwitchControllerNode.swift */; };
|
||||
D03E466923075E660049C28B /* LogoutOptionsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E465D23075E630049C28B /* LogoutOptionsController.swift */; };
|
||||
@@ -194,6 +195,7 @@
|
||||
/* Begin PBXFileReference section */
|
||||
091EABA4231DAC7500A0EC14 /* ThemeNameGenerator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeNameGenerator.swift; sourceTree = "<group>"; };
|
||||
09B4A9B723102B7A005C2E08 /* EditThemeController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditThemeController.swift; sourceTree = "<group>"; };
|
||||
09CE5B8D2322154400743FF4 /* SegmentedControlNode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SegmentedControlNode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D03E464D23075D930049C28B /* SettingsUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SettingsUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D03E465023075D930049C28B /* SettingsUI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SettingsUI.h; sourceTree = "<group>"; };
|
||||
D03E465123075D930049C28B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
@@ -384,6 +386,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D0EFF26A2319825B00CF5164 /* AppBundle.framework in Frameworks */,
|
||||
09CE5B8E2322154400743FF4 /* SegmentedControlNode.framework in Frameworks */,
|
||||
D03E493A2308678D0049C28B /* InstantPageCache.framework in Frameworks */,
|
||||
D03E490E2308661A0049C28B /* GridMessageSelectionNode.framework in Frameworks */,
|
||||
D03E48E22308649C0049C28B /* CounterContollerTitleView.framework in Frameworks */,
|
||||
@@ -688,6 +691,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0EFF2692319825B00CF5164 /* AppBundle.framework */,
|
||||
09CE5B8D2322154400743FF4 /* SegmentedControlNode.framework */,
|
||||
D03E49392308678D0049C28B /* InstantPageCache.framework */,
|
||||
D03E490D2308661A0049C28B /* GridMessageSelectionNode.framework */,
|
||||
D03E48E12308649C0049C28B /* CounterContollerTitleView.framework */,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -85,15 +85,15 @@ final class RecentSessionsEmptyStateItemNode: ItemListControllerEmptyStateItemNo
|
||||
let imageSize = self.imageNode.image?.size ?? CGSize()
|
||||
let imageHeight = layout.size.width < layout.size.height ? imageSize.height + imageSpacing : 0.0
|
||||
|
||||
let titleSize = self.titleNode.measure(CGSize(width: layout.size.width - 50.0, height: max(1.0, layout.size.height - insets.top - insets.bottom)))
|
||||
let textSize = self.textNode.measure(CGSize(width: layout.size.width - 50.0, height: max(1.0, layout.size.height - insets.top - insets.bottom)))
|
||||
let titleSize = self.titleNode.measure(CGSize(width: layout.size.width - layout.safeInsets.left - layout.safeInsets.right - layout.intrinsicInsets.left - layout.intrinsicInsets.right - 50.0, height: max(1.0, layout.size.height - insets.top - insets.bottom)))
|
||||
let textSize = self.textNode.measure(CGSize(width: layout.size.width - layout.safeInsets.left - layout.safeInsets.right - layout.intrinsicInsets.left - layout.intrinsicInsets.right - 50.0, height: max(1.0, layout.size.height - insets.top - insets.bottom)))
|
||||
|
||||
let totalHeight = imageHeight + titleSize.height + textSpacing + textSize.height
|
||||
let topOffset = insets.top + floor((layout.size.height - insets.top - insets.bottom - totalHeight) / 2.0)
|
||||
|
||||
transition.updateAlpha(node: self.imageNode, alpha: imageHeight > 0.0 ? 1.0 : 0.0)
|
||||
transition.updateFrame(node: self.imageNode, frame: CGRect(origin: CGPoint(x: floor((layout.size.width - imageSize.width) / 2.0), y: topOffset), size: imageSize))
|
||||
transition.updateFrame(node: self.titleNode, frame: CGRect(origin: CGPoint(x: floor((layout.size.width - titleSize.width) / 2.0), y: topOffset + imageHeight), size: titleSize))
|
||||
transition.updateFrame(node: self.textNode, frame: CGRect(origin: CGPoint(x: floor((layout.size.width - textSize.width) / 2.0), y: self.titleNode.frame.maxY + textSpacing), size: textSize))
|
||||
transition.updateFrame(node: self.titleNode, frame: CGRect(origin: CGPoint(x: floor((layout.size.width - titleSize.width - layout.safeInsets.left - layout.safeInsets.right - layout.intrinsicInsets.left - layout.intrinsicInsets.right) / 2.0), y: topOffset + imageHeight), size: titleSize))
|
||||
transition.updateFrame(node: self.textNode, frame: CGRect(origin: CGPoint(x: floor((layout.size.width - textSize.width - layout.safeInsets.left - layout.safeInsets.right - layout.intrinsicInsets.left - layout.intrinsicInsets.right) / 2.0), y: self.titleNode.frame.maxY + textSpacing), size: textSize))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,9 +335,10 @@ func generateThemeName(accentColor: UIColor) -> String {
|
||||
|
||||
if let color = nearest?.color, let colorName = colors[color]?.capitalized {
|
||||
if arc4random() % 2 == 0 {
|
||||
return "\(adjectives[Int(arc4random()) % adjectives.count].capitalized) \(colorName)"
|
||||
|
||||
return "\((adjectives.randomElement() ?? "").capitalized) \(colorName)"
|
||||
} else {
|
||||
return "\(colorName) \(subjectives[Int(arc4random()) % subjectives.count].capitalized)"
|
||||
return "\(colorName) \((subjectives.randomElement() ?? "").capitalized)"
|
||||
}
|
||||
} else {
|
||||
return ""
|
||||
|
||||
@@ -85,6 +85,7 @@ final class ThemePreviewControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
self.chatListBackgroundNode = ASDisplayNode()
|
||||
|
||||
self.chatContainerNode = ASDisplayNode()
|
||||
self.chatContainerNode.clipsToBounds = true
|
||||
self.instantChatBackgroundNode = WallpaperBackgroundNode()
|
||||
self.instantChatBackgroundNode.displaysAsynchronously = false
|
||||
self.instantChatBackgroundNode.image = chatControllerBackgroundImage(theme: previewTheme, wallpaper: previewTheme.chat.defaultWallpaper, mediaBox: context.sharedContext.accountManager.mediaBox, knockoutMode: context.sharedContext.immediateExperimentalUISettings.knockoutWallpaper)
|
||||
@@ -96,7 +97,6 @@ final class ThemePreviewControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
self.remoteChatBackgroundNode.view.contentMode = .scaleAspectFill
|
||||
|
||||
self.blurredNode = BlurredImageNode()
|
||||
self.blurredNode.clipsToBounds = true
|
||||
self.blurredNode.blurView.contentMode = .scaleAspectFill
|
||||
|
||||
self.toolbarNode = WallpaperGalleryToolbarNode(theme: self.previewTheme, strings: self.presentationData.strings)
|
||||
|
||||
Reference in New Issue
Block a user