Clean up attachment editing

pull/68/head
Niels Andriesse 5 years ago
parent d90abd3fe8
commit 2ffdbbb031

@ -56,7 +56,7 @@ class PhotoCaptureViewController: OWSViewController {
override func loadView() { override func loadView() {
self.view = UIView() self.view = UIView()
self.view.backgroundColor = Theme.darkThemeBackgroundColor self.view.backgroundColor = Colors.navigationBarBackground
let audioActivity = AudioActivity(audioDescription: "PhotoCaptureViewController", behavior: .playAndRecord) let audioActivity = AudioActivity(audioDescription: "PhotoCaptureViewController", behavior: .playAndRecord)
self.audioActivity = audioActivity self.audioActivity = audioActivity
@ -147,7 +147,7 @@ class PhotoCaptureViewController: OWSViewController {
} }
private lazy var dismissControl: PhotoControl = { private lazy var dismissControl: PhotoControl = {
return PhotoControl(imageName: "ic_x_with_shadow") { [weak self] in return PhotoControl(imageName: "X") { [weak self] in
self?.didTapClose() self?.didTapClose()
} }
}() }()

@ -105,7 +105,7 @@
"ATTACHMENT_APPROVAL_FILE_SIZE_FORMAT" = "Size: %@"; "ATTACHMENT_APPROVAL_FILE_SIZE_FORMAT" = "Size: %@";
/* One-line label indicating the user can add no more text to the media message field. */ /* One-line label indicating the user can add no more text to the media message field. */
"ATTACHMENT_APPROVAL_MESSAGE_LENGTH_LIMIT_REACHED" = "Message limit reached."; "ATTACHMENT_APPROVAL_MESSAGE_LENGTH_LIMIT_REACHED" = "Message limit reached";
/* Label for 'send' button in the 'attachment approval' dialog. */ /* Label for 'send' button in the 'attachment approval' dialog. */
"ATTACHMENT_APPROVAL_SEND_BUTTON" = "Send"; "ATTACHMENT_APPROVAL_SEND_BUTTON" = "Send";

@ -65,7 +65,7 @@ class AttachmentApprovalInputAccessoryView: UIView {
backgroundView.autoPinEdgesToSuperviewEdges() backgroundView.autoPinEdgesToSuperviewEdges()
currentCaptionLabel.textColor = UIColor(white: 1, alpha: 0.8) currentCaptionLabel.textColor = UIColor(white: 1, alpha: 0.8)
currentCaptionLabel.font = UIFont.ows_dynamicTypeBody currentCaptionLabel.font = .systemFont(ofSize: 15) // Values.mediumFontSize
currentCaptionLabel.numberOfLines = 5 currentCaptionLabel.numberOfLines = 5
currentCaptionLabel.lineBreakMode = .byWordWrapping currentCaptionLabel.lineBreakMode = .byWordWrapping

@ -86,7 +86,7 @@ public class AttachmentPrepViewController: OWSViewController, PlayerProgressBarD
scrollView.autoPinEdgesToSuperviewEdges() scrollView.autoPinEdgesToSuperviewEdges()
let backgroundColor = UIColor.black let backgroundColor = UIColor(rgbHex: 0x161616) // Colors.navigationBarBackground
self.view.backgroundColor = backgroundColor self.view.backgroundColor = backgroundColor
// Create full screen container view so the scrollView // Create full screen container view so the scrollView

@ -61,9 +61,9 @@ class AttachmentTextToolbar: UIView, UITextViewDelegate {
sendButton.setTitle(sendTitle, for: .normal) sendButton.setTitle(sendTitle, for: .normal)
sendButton.addTarget(self, action: #selector(didTapSend), for: .touchUpInside) sendButton.addTarget(self, action: #selector(didTapSend), for: .touchUpInside)
sendButton.titleLabel?.font = UIFont.ows_mediumFont(withSize: 16) sendButton.titleLabel?.font = .boldSystemFont(ofSize: 15) // Values.mediumFontSize
sendButton.titleLabel?.textAlignment = .center sendButton.titleLabel?.textAlignment = .center
sendButton.tintColor = Theme.galleryHighlightColor sendButton.tintColor = UIColor(rgbHex: 0x00F782) // Colors.accent
// Increase hit area of send button // Increase hit area of send button
sendButton.contentEdgeInsets = UIEdgeInsets(top: 6, left: 8, bottom: 6, right: 8) sendButton.contentEdgeInsets = UIEdgeInsets(top: 6, left: 8, bottom: 6, right: 8)
@ -158,7 +158,7 @@ class AttachmentTextToolbar: UIView, UITextViewDelegate {
private lazy var placeholderTextView: UITextView = { private lazy var placeholderTextView: UITextView = {
let placeholderTextView = buildTextView() let placeholderTextView = buildTextView()
placeholderTextView.text = NSLocalizedString("MESSAGE_TEXT_FIELD_PLACEHOLDER", comment: "placeholder text for the editable message field") placeholderTextView.text = NSLocalizedString("Message", comment: "")
placeholderTextView.isEditable = false placeholderTextView.isEditable = false
return placeholderTextView return placeholderTextView
@ -188,9 +188,10 @@ class AttachmentTextToolbar: UIView, UITextViewDelegate {
textView.backgroundColor = .clear textView.backgroundColor = .clear
textView.tintColor = Theme.darkThemePrimaryColor textView.tintColor = Theme.darkThemePrimaryColor
textView.font = UIFont.ows_dynamicTypeBody textView.font = .systemFont(ofSize: 15) // Values.mediumFontSize
textView.textColor = Theme.darkThemePrimaryColor textView.textColor = Theme.darkThemePrimaryColor
textView.textContainerInset = UIEdgeInsets(top: 7, left: 7, bottom: 7, right: 7) textView.showsVerticalScrollIndicator = false
textView.textContainerInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
return textView return textView
} }

@ -334,7 +334,7 @@ public class MediaMessageView: UIView, OWSAudioPlayerDelegate {
private var controlTintColor: UIColor { private var controlTintColor: UIColor {
switch mode { switch mode {
case .small, .large: case .small, .large:
return UIColor.ows_materialBlue return UIColor(rgbHex: 0x00F782) // Colors.accent
case .attachmentApproval: case .attachmentApproval:
return UIColor.white return UIColor.white
} }

@ -74,7 +74,7 @@ public class GalleryRailCellView: UIView {
layoutMargins = UIEdgeInsets(top: 0, left: cellBorderWidth, bottom: 0, right: cellBorderWidth) layoutMargins = UIEdgeInsets(top: 0, left: cellBorderWidth, bottom: 0, right: cellBorderWidth)
if isSelected { if isSelected {
contentContainer.layer.borderColor = Theme.galleryHighlightColor.cgColor contentContainer.layer.borderColor = UIColor(rgbHex: 0x00F782).cgColor // Colors.accent
contentContainer.layer.borderWidth = cellBorderWidth contentContainer.layer.borderWidth = cellBorderWidth
} else { } else {
contentContainer.layer.borderWidth = 0 contentContainer.layer.borderWidth = 0

@ -49,7 +49,7 @@ public class ImageEditorBrushViewController: OWSViewController {
public override func loadView() { public override func loadView() {
self.view = UIView() self.view = UIView()
self.view.backgroundColor = .black self.view.backgroundColor = UIColor(rgbHex: 0x161616) // Colors.navigationBarBackground
self.view.isOpaque = true self.view.isOpaque = true
canvasView.configureSubviews() canvasView.configureSubviews()

@ -86,7 +86,7 @@ class ImageEditorCropViewController: OWSViewController {
override func loadView() { override func loadView() {
self.view = UIView() self.view = UIView()
self.view.backgroundColor = .black self.view.backgroundColor = UIColor(rgbHex: 0x161616) // Colors.navigationBarBackground
self.view.layoutMargins = .zero self.view.layoutMargins = .zero
// MARK: - Buttons // MARK: - Buttons

@ -161,7 +161,7 @@ public class ImageEditorTextViewController: OWSViewController, VAlignTextViewDel
public override func loadView() { public override func loadView() {
self.view = UIView() self.view = UIView()
self.view.backgroundColor = .black self.view.backgroundColor = UIColor(rgbHex: 0x161616) // Colors.navigationBarBackground
self.view.isOpaque = true self.view.isOpaque = true
canvasView.configureSubviews() canvasView.configureSubviews()

Loading…
Cancel
Save