Clean up attachment editing

This commit is contained in:
Niels Andriesse 2019-12-13 12:23:43 +11:00
parent d90abd3fe8
commit 2ffdbbb031
10 changed files with 17 additions and 16 deletions

View File

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

View File

@ -105,7 +105,7 @@
"ATTACHMENT_APPROVAL_FILE_SIZE_FORMAT" = "Size: %@";
/* 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. */
"ATTACHMENT_APPROVAL_SEND_BUTTON" = "Send";

View File

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

View File

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

View File

@ -61,9 +61,9 @@ class AttachmentTextToolbar: UIView, UITextViewDelegate {
sendButton.setTitle(sendTitle, for: .normal)
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.tintColor = Theme.galleryHighlightColor
sendButton.tintColor = UIColor(rgbHex: 0x00F782) // Colors.accent
// Increase hit area of send button
sendButton.contentEdgeInsets = UIEdgeInsets(top: 6, left: 8, bottom: 6, right: 8)
@ -158,7 +158,7 @@ class AttachmentTextToolbar: UIView, UITextViewDelegate {
private lazy var placeholderTextView: UITextView = {
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
return placeholderTextView
@ -188,9 +188,10 @@ class AttachmentTextToolbar: UIView, UITextViewDelegate {
textView.backgroundColor = .clear
textView.tintColor = Theme.darkThemePrimaryColor
textView.font = UIFont.ows_dynamicTypeBody
textView.font = .systemFont(ofSize: 15) // Values.mediumFontSize
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
}

View File

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

View File

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

View File

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

View File

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

View File

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