Browse Source

Fix FSCalendar appearance

Signed-off-by: Henrik Storch <henrik.storch@nextcloud.com>
Henrik Storch 3 years ago
parent
commit
3d46dcc3d4

+ 1 - 1
iOSClient/Share/NCShareCommon.swift

@@ -165,7 +165,7 @@ class NCShareCommon: NSObject {
         
         calendar.appearance.headerTitleFont = UIFont.systemFont(ofSize: 13)
         
-        calendar.appearance.weekdayTextColor = UIColor(red: 100/255, green: 100/255, blue: 100/255, alpha: 1)
+        calendar.appearance.weekdayTextColor = NCBrandColor.shared.gray
         calendar.appearance.weekdayFont = UIFont.systemFont(ofSize: 13)
         
         calendar.appearance.todayColor = NCBrandColor.shared.brandElement

+ 4 - 8
iOSClient/Share/NCShareLinkMenuView.swift

@@ -132,9 +132,9 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, UITextFieldDeleg
         fieldPasswordProtect.delegate = self
         fieldNoteToRecipient.delegate = self
         
-        imageNoteToRecipient.image = UIImage.init(named: "file_txt")!.image(color: UIColor(red: 76/255, green: 76/255, blue: 76/255, alpha: 1), size: 50)
-        imageDeleteShareLink.image = NCUtility.shared.loadImage(named: "trash", color: UIColor(red: 76/255, green: 76/255, blue: 76/255, alpha: 1), size: 50)
-        imageAddAnotherLink.image =  NCUtility.shared.loadImage(named: "plus", color: UIColor(red: 76/255, green: 76/255, blue: 76/255, alpha: 1), size: 50)
+        imageNoteToRecipient.image = UIImage.init(named: "file_txt")!.image(color: NCBrandColor.shared.gray, size: 50)
+        imageDeleteShareLink.image = NCUtility.shared.loadImage(named: "trash", color: NCBrandColor.shared.gray, size: 50)
+        imageAddAnotherLink.image =  NCUtility.shared.loadImage(named: "plus", color: NCBrandColor.shared.gray, size: 50)
         
         NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(_:)), name: UIResponder.keyboardWillShowNotification, object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(_:)), name: UIResponder.keyboardWillHideNotification, object: nil)
@@ -479,10 +479,6 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, UITextFieldDeleg
     }
     
     func calendar(_ calendar: FSCalendar, appearance: FSCalendarAppearance, titleDefaultColorFor date: Date) -> UIColor? {
-        if date > Date() {
-            return UIColor(red: 60/255, green: 60/255, blue: 60/255, alpha: 1)
-        } else {
-            return UIColor(red: 190/255, green: 190/255, blue: 190/255, alpha: 1)
-        }
+        return date > Date() ? NCBrandColor.shared.label : NCBrandColor.shared.systemGray3
     }
 }

+ 3 - 7
iOSClient/Share/NCShareUserMenuView.swift

@@ -105,8 +105,8 @@ class NCShareUserMenuView: UIView, UIGestureRecognizerDelegate, UITextFieldDeleg
         
         fieldNoteToRecipient.delegate = self
         
-        imageNoteToRecipient.image = UIImage.init(named: "file_txt")!.image(color: UIColor(red: 76/255, green: 76/255, blue: 76/255, alpha: 1), size: 50)
-        imageUnshare.image = NCUtility.shared.loadImage(named: "trash", color: UIColor(red: 76/255, green: 76/255, blue: 76/255, alpha: 1), size: 50)
+        imageNoteToRecipient.image = UIImage.init(named: "file_txt")!.image(color: NCBrandColor.shared.gray, size: 50)
+        imageUnshare.image = NCUtility.shared.loadImage(named: "trash", color: NCBrandColor.shared.gray, size: 50)
         
         NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(_:)), name: UIResponder.keyboardWillShowNotification, object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(_:)), name: UIResponder.keyboardWillHideNotification, object: nil)
@@ -393,10 +393,6 @@ class NCShareUserMenuView: UIView, UIGestureRecognizerDelegate, UITextFieldDeleg
     }
     
     func calendar(_ calendar: FSCalendar, appearance: FSCalendarAppearance, titleDefaultColorFor date: Date) -> UIColor? {
-        if date > Date() {
-            return UIColor(red: 60/255, green: 60/255, blue: 60/255, alpha: 1)
-        } else {
-            return UIColor(red: 190/255, green: 190/255, blue: 190/255, alpha: 1)
-        }
+        return date > Date() ? NCBrandColor.shared.label : NCBrandColor.shared.systemGray3
     }
 }