Various improvements

This commit is contained in:
Ilya Laktyushin
2025-12-29 10:05:51 +04:00
parent d2456c2a6b
commit 966182bd2f
53 changed files with 1379 additions and 1035 deletions

View File

@@ -32,6 +32,7 @@ public final class SearchInputPanelComponent: Component {
public let safeInsets: UIEdgeInsets
public let placeholder: String?
public let resetText: ResetText?
public let hasEdgeEffect: Bool
public let updated: ((String) -> Void)
public let cancel: () -> Void
@@ -42,6 +43,7 @@ public final class SearchInputPanelComponent: Component {
safeInsets: UIEdgeInsets,
placeholder: String? = nil,
resetText: ResetText? = nil,
hasEdgeEffect: Bool = true,
updated: @escaping ((String) -> Void),
cancel: @escaping () -> Void
) {
@@ -51,6 +53,7 @@ public final class SearchInputPanelComponent: Component {
self.safeInsets = safeInsets
self.placeholder = placeholder
self.resetText = resetText
self.hasEdgeEffect = hasEdgeEffect
self.updated = updated
self.cancel = cancel
}
@@ -321,6 +324,7 @@ public final class SearchInputPanelComponent: Component {
let edgeEffectFrame = CGRect(origin: CGPoint(x: 0.0, y: size.height - edgeEffectHeight + 30.0), size: CGSize(width: size.width, height: edgeEffectHeight))
transition.setFrame(view: self.edgeEffectView, frame: edgeEffectFrame)
self.edgeEffectView.update(content: edgeColor, blur: true, rect: edgeEffectFrame, edge: .bottom, edgeSize: edgeEffectFrame.height, transition: transition)
self.edgeEffectView.isHidden = !component.hasEdgeEffect
transition.setFrame(view: self.containerView, frame: CGRect(origin: .zero, size: size))
self.containerView.update(size: size, isDark: component.theme.overallDarkAppearance, transition: transition)