Преглед на файлове

simplify and cleanup providerPreparationBackground color

cyberta преди 3 години
родител
ревизия
d4e0e5741a
променени са 3 файла, в които са добавени 12 реда и са изтрити 3 реда
  1. 1 1
      DcCore/DcCore/Helper/DcColors.swift
  2. 11 1
      deltachat-ios/Chat/Views/DraftArea.swift
  3. 0 1
      deltachat-ios/Chat/Views/DraftPreview.swift

+ 1 - 1
DcCore/DcCore/Helper/DcColors.swift

@@ -24,11 +24,11 @@ public struct DcColors {
     public static let grayDateColor = UIColor.themeColor(lightHex: "999999", darkHex: "bbbbbb") // slight variations of lightGray (#aaaaaa)
     public static let middleGray = UIColor(hexString: "848ba7")
     public static let secondaryTextColor = UIColor.themeColor(lightHex: "848ba7", darkHex: "a5abc0")
-    public static let providerPreparationBackground = UIColor.themeColor(lightHex: "#fffdf7b2", darkHex: "##fffdf7b2")
     public static let inputFieldColor =  UIColor.themeColor(
         light: UIColor(red: 200 / 255, green: 200 / 255, blue: 200 / 255, alpha: 0.25),
         dark: UIColor(red: 30 / 255, green: 30 / 255, blue: 30 / 255, alpha: 0.25))
     public static let placeholderColor = UIColor(red: 0.55, green: 0.55, blue: 0.55, alpha: 1)
+    public static let providerPreparationBackground = UIColor.init(hexString: "fdf7b2")
     public static let providerBrokenBackground = UIColor.themeColor(light: SystemColor.red.uiColor, dark: SystemColor.red.uiColor)
     public static let systemMessageBackgroundColor = UIColor.init(hexString: "55444444")
     public static let deaddropBackground = UIColor.themeColor(light: UIColor.init(hexString: "ebebec"), dark: UIColor.init(hexString: "1a1a1c"))

+ 11 - 1
deltachat-ios/Chat/Views/DraftArea.swift

@@ -28,6 +28,14 @@ public class DraftArea: UIView, InputItem {
         return view
     }()
 
+    lazy var blurView: UIVisualEffectView = {
+        let blurEffect = UIBlurEffect(style: .light)
+        let view = UIVisualEffectView(effect: blurEffect)
+        view.translatesAutoresizingMaskIntoConstraints = false
+        return view
+    }()
+
+
     lazy var quotePreview: QuotePreview = {
         let view = QuotePreview()
         view.translatesAutoresizingMaskIntoConstraints = false
@@ -61,9 +69,11 @@ public class DraftArea: UIView, InputItem {
     }
 
     public func setupSubviews() {
+        addSubview(blurView)
         addSubview(mainContentView)
+        backgroundColor = DcColors.defaultBackgroundColor.withAlphaComponent(0.75)
+        blurView.fillSuperview()
         mainContentView.fillSuperview()
-        mainContentView.backgroundColor = DcColors.chatBackgroundColor
     }
 
     public func configure(draft: DraftModel) {

+ 0 - 1
deltachat-ios/Chat/Views/DraftPreview.swift

@@ -73,7 +73,6 @@ public class DraftPreview: UIView {
         ])
         let recognizer = UITapGestureRecognizer(target: self, action: #selector(cancel))
         cancelButton.addGestureRecognizer(recognizer)
-        backgroundColor = DcColors.chatBackgroundColor
         isAccessibilityElement = true
         let accessibilityCancelAction = UIAccessibilityCustomAction(name: String.localized("cancel"), target: self, selector: #selector(cancel))
         accessibilityCustomActions = [accessibilityCancelAction]