Camera and editor improvements

This commit is contained in:
Ilya Laktyushin
2023-06-03 01:19:23 +04:00
parent 3df2d3cad5
commit ab69b9e982
48 changed files with 2154 additions and 557 deletions

View File

@@ -621,7 +621,7 @@ private func generateKnobImage() -> UIImage? {
return image?.stretchableImage(withLeftCapWidth: Int(margin + side * 0.5), topCapHeight: Int(margin + side * 0.5))
}
final class TextSizeSliderComponent: Component {
public final class TextSizeSliderComponent: Component {
let value: CGFloat
let tag: AnyObject?
let updated: (CGFloat) -> Void
@@ -646,7 +646,7 @@ final class TextSizeSliderComponent: Component {
return true
}
final class View: UIView, UIGestureRecognizerDelegate, ComponentTaggedView {
public final class View: UIView, UIGestureRecognizerDelegate, ComponentTaggedView {
private var validSize: CGSize?
private let backgroundNode = NavigationBackgroundNode(color: UIColor(rgb: 0x888888, alpha: 0.3))
@@ -739,7 +739,7 @@ final class TextSizeSliderComponent: Component {
}
}
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true
}
@@ -787,11 +787,11 @@ final class TextSizeSliderComponent: Component {
}
}
func makeView() -> View {
public func makeView() -> View {
return View()
}
func update(view: View, availableSize: CGSize, state: EmptyComponentState, environment: Environment<Empty>, transition: Transition) -> CGSize {
public func update(view: View, availableSize: CGSize, state: EmptyComponentState, environment: Environment<Empty>, transition: Transition) -> CGSize {
view.updated = self.updated
view.released = self.released
return view.updateLayout(size: availableSize, component: self, transition: transition)