Camera and editor improvements

This commit is contained in:
Ilya Laktyushin
2023-05-27 02:29:23 +04:00
parent e419ccf8f3
commit 2d738fbfac
20 changed files with 960 additions and 703 deletions

View File

@@ -937,7 +937,7 @@ final class ColorSpectrumComponent: Component {
}
}
final class ColorSpectrumPickerView: UIView, UIGestureRecognizerDelegate {
public final class ColorSpectrumPickerView: UIView, UIGestureRecognizerDelegate {
private var validSize: CGSize?
private var selectedColor: DrawingColor?
@@ -950,7 +950,7 @@ final class ColorSpectrumPickerView: UIView, UIGestureRecognizerDelegate {
private var circleMaskView = UIView()
private let maskCircle = SimpleShapeLayer()
var selected: (DrawingColor) -> Void = { _ in }
public var selected: (DrawingColor) -> Void = { _ in }
private var bitmapData: UnsafeMutableRawPointer?
@@ -1048,7 +1048,7 @@ final class ColorSpectrumPickerView: UIView, UIGestureRecognizerDelegate {
private var animatingIn = false
private var scheduledAnimateOut: (() -> Void)?
func animateIn() {
public func animateIn() {
self.animatingIn = true
Queue.mainQueue().after(0.15) {
@@ -1107,7 +1107,7 @@ final class ColorSpectrumPickerView: UIView, UIGestureRecognizerDelegate {
})
}
func updateLayout(size: CGSize, selectedColor: DrawingColor?) -> CGSize {
public func updateLayout(size: CGSize, selectedColor: DrawingColor?) -> CGSize {
let previousSize = self.validSize
let imageSize = size
@@ -2413,10 +2413,10 @@ private final class ColorPickerSheetComponent: CombinedComponent {
}
}
class ColorPickerScreen: ViewControllerComponentContainer {
public final class ColorPickerScreen: ViewControllerComponentContainer {
private var dismissed: () -> Void
init(context: AccountContext, initialColor: DrawingColor, updated: @escaping (DrawingColor) -> Void, openEyedropper: @escaping () -> Void, dismissed: @escaping () -> Void = {}) {
public init(context: AccountContext, initialColor: DrawingColor, updated: @escaping (DrawingColor) -> Void, openEyedropper: @escaping () -> Void, dismissed: @escaping () -> Void = {}) {
self.dismissed = dismissed
super.init(context: context, component: ColorPickerSheetComponent(context: context, initialColor: initialColor, updated: updated, openEyedropper: openEyedropper, dismissed: dismissed), navigationBarAppearance: .none)