This commit is contained in:
Isaac
2025-12-12 23:58:00 +08:00
parent 3982aa3f9e
commit a63c90aa00
41 changed files with 550 additions and 503 deletions

View File

@@ -359,6 +359,9 @@ public final class ChatListNavigationBar: Component {
let searchOffsetFraction = clippedSearchOffset / searchOffsetDistance
searchContentNode.expansionProgress = 1.0 - searchOffsetFraction
embeddedSearchBarExpansionHeight = 60.0 - floorToScreenPixels((1.0 - searchOffsetFraction) * searchSize.height)
if searchOffsetFraction > 0.0 {
searchFrame.origin.y -= (60.0 - 44.0) * 0.5 * searchOffsetFraction
}
searchFrameValue = searchFrame
transition.setFrameWithAdditivePosition(view: searchContentNode.view, frame: searchFrame)
@@ -479,7 +482,7 @@ public final class ChatListNavigationBar: Component {
if component.statusBarHeight < 1.0 {
headerContentY = 0.0
} else {
headerContentY = component.statusBarHeight + 5.0
headerContentY = component.statusBarHeight + 10.0
}
}
let headerContentFrame = CGRect(origin: CGPoint(x: 0.0, y: headerContentY), size: headerContentSize)
@@ -683,7 +686,7 @@ public final class ChatListNavigationBar: Component {
}
} else {
contentHeight += 44.0
contentHeight += 8.0
contentHeight += 7.0
if component.search != nil {
contentHeight += navigationBarSearchContentHeight
@@ -696,8 +699,6 @@ public final class ChatListNavigationBar: Component {
transition.setFrame(view: disappearingHeaderPanelsView, frame: headerPanelsFrame)
}
if let headerPanels = component.headerPanels {
headersContentHeight += 4.0
let headerPanelsView: ComponentView<Empty>
var headerPanelsTransition = transition
if let current = self.headerPanelsView {

View File

@@ -116,7 +116,7 @@ public final class NavigationButtonComponent: Component {
switch component.content {
case let .text(title, isBold):
textString = NSAttributedString(string: title, font: isBold ? Font.bold(17.0) : Font.regular(17.0), textColor: theme.chat.inputPanel.panelControlColor)
textString = NSAttributedString(string: title, font: isBold ? Font.bold(17.0) : Font.medium(17.0), textColor: theme.chat.inputPanel.panelControlColor)
case .more:
isMore = true
case let .icon(imageNameValue):
@@ -140,7 +140,7 @@ public final class NavigationButtonComponent: Component {
textView.attributedText = textString
let textSize = textView.updateLayout(availableSize)
let textInset: CGFloat = 10.0
let textInset: CGFloat = 12.0
size.width = max(44.0, textSize.width + textInset * 2.0)
textView.frame = CGRect(origin: CGPoint(x: floor((size.width - textSize.width) / 2.0), y: floor((availableSize.height - textSize.height) / 2.0)), size: textSize)