diff --git a/Components/Sources/Components/Assets.xcassets/separator.imageset/Contents.json b/Components/Sources/Components/Assets.xcassets/separator.imageset/Contents.json deleted file mode 100644 index 68b1578a788..00000000000 --- a/Components/Sources/Components/Assets.xcassets/separator.imageset/Contents.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "images" : [ - { - "filename" : "separator.pdf", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - }, - "properties" : { - "template-rendering-intent" : "template" - } -} diff --git a/Components/Sources/Components/Assets.xcassets/separator.imageset/separator.pdf b/Components/Sources/Components/Assets.xcassets/separator.imageset/separator.pdf deleted file mode 100644 index 04d07b798e4..00000000000 Binary files a/Components/Sources/Components/Assets.xcassets/separator.imageset/separator.pdf and /dev/null differ diff --git a/Components/Sources/Components/Components/Editors/Common Views/Base/WKEditorToolbarButton.swift b/Components/Sources/Components/Components/Editors/Common Views/Base/WKEditorToolbarButton.swift index b10a7623b57..8bd12fb60e7 100644 --- a/Components/Sources/Components/Components/Editors/Common Views/Base/WKEditorToolbarButton.swift +++ b/Components/Sources/Components/Components/Editors/Common Views/Base/WKEditorToolbarButton.swift @@ -113,7 +113,7 @@ class WKEditorToolbarButton: WKComponentView { private func createButtonConfig(image: UIImage? = nil) -> UIButton.Configuration { var buttonConfig = UIButton.Configuration.plain() - buttonConfig.baseForegroundColor = (button?.isSelected ?? false) ? theme.inputAccessoryButtonSelectedTint : theme.inputAccessoryButtonTint + buttonConfig.baseForegroundColor = theme.text buttonConfig.contentInsets = NSDirectionalEdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0) buttonConfig.background.cornerRadius = 0 if let image { @@ -125,8 +125,7 @@ class WKEditorToolbarButton: WKComponentView { private func buttonConfigurationUpdateHandler(button: UIButton) { var buttonConfig = button.configuration - buttonConfig?.baseForegroundColor = button.isSelected ? theme.inputAccessoryButtonSelectedTint : theme.inputAccessoryButtonTint - buttonConfig?.background.backgroundColor = button.isSelected ? theme.inputAccessoryButtonSelectedBackgroundColor : theme.accessoryBackground + buttonConfig?.background.backgroundColor = button.isSelected ? self.theme.editorButtonSelectedBackground : theme.paperBackground button.configuration = buttonConfig } diff --git a/Components/Sources/Components/Components/Editors/Common Views/Base/WKEditorToolbarView.swift b/Components/Sources/Components/Components/Editors/Common Views/Base/WKEditorToolbarView.swift index 9fe2eb37f79..cbffa947fae 100644 --- a/Components/Sources/Components/Components/Editors/Common Views/Base/WKEditorToolbarView.swift +++ b/Components/Sources/Components/Components/Editors/Common Views/Base/WKEditorToolbarView.swift @@ -5,7 +5,8 @@ class WKEditorToolbarView: WKComponentView { // MARK: - Properties - @IBOutlet var separatorViews: [UIView] = [] + @IBOutlet var separatorImageViews: [UIImageView] = [] + @IBOutlet var separatorImageWidthConstraints: [NSLayoutConstraint] = [] @IBOutlet var buttons: [WKEditorToolbarButton] = [] // MARK: - Lifecycle @@ -13,6 +14,18 @@ class WKEditorToolbarView: WKComponentView { override func awakeFromNib() { super.awakeFromNib() accessibilityElements = buttons + + let width = (1.0 / UIScreen.main.scale) * 2 + for separatorImageView in self.separatorImageViews { + + let image = UIImage.roundedRectImage(with: .black, cornerRadius: 0, width: width, height: 32) + separatorImageView.image = image?.withRenderingMode(.alwaysTemplate) + } + + for separatorWidthConstraint in separatorImageWidthConstraints { + separatorWidthConstraint.constant = width + } + updateColors() maximumContentSizeCategory = .accessibilityMedium } @@ -31,12 +44,15 @@ class WKEditorToolbarView: WKComponentView { // MARK: - Private Helpers private func updateColors() { - tintColor = WKAppEnvironment.current.theme.link - backgroundColor = WKAppEnvironment.current.theme.accessoryBackground + backgroundColor = WKAppEnvironment.current.theme.paperBackground layer.shadowOffset = CGSize(width: 0, height: -2) layer.shadowRadius = 10 layer.shadowOpacity = 1.0 layer.shadowColor = theme.editorKeyboardShadow.cgColor + + for separatorImageView in separatorImageViews { + separatorImageView.tintColor = theme.newBorder + } } } diff --git a/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Expanding/WKEditorToolbarExpandingView.swift b/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Expanding/WKEditorToolbarExpandingView.swift index b4ebce3079d..3fd2b468154 100644 --- a/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Expanding/WKEditorToolbarExpandingView.swift +++ b/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Expanding/WKEditorToolbarExpandingView.swift @@ -73,6 +73,7 @@ class WKEditorToolbarExpandingView: WKEditorToolbarView { override func awakeFromNib() { super.awakeFromNib() + stackView.isLayoutMarginsRelativeArrangement = true stackView.layoutMargins = UIEdgeInsets(top: 5, left: 0, bottom: 5, right: 0) diff --git a/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Expanding/WKEditorToolbarExpandingView.xib b/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Expanding/WKEditorToolbarExpandingView.xib index 4b9c61e75cc..c71e2b9ec9b 100644 --- a/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Expanding/WKEditorToolbarExpandingView.xib +++ b/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Expanding/WKEditorToolbarExpandingView.xib @@ -1,9 +1,9 @@ - + - + @@ -13,57 +13,61 @@ - + - + - + - + - + - + - + - - + + - - - - - - + + + + + + + + - - + + - - + + - - + + - - - - - - + + + + + + + + @@ -77,49 +81,53 @@ - + - + - - + + - - + + - - - - - - + + + + + + + + - - + + - - - - - - + + + + + + + + - - + + - - + + - - + + @@ -186,7 +194,7 @@ - + @@ -286,10 +294,6 @@ - - - - @@ -304,8 +308,16 @@ + + + + + + + + - + diff --git a/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Highlight/WKEditorToolbarHighlightView.xib b/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Highlight/WKEditorToolbarHighlightView.xib index 37ecb6e927b..c81e01bf161 100644 --- a/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Highlight/WKEditorToolbarHighlightView.xib +++ b/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Highlight/WKEditorToolbarHighlightView.xib @@ -1,9 +1,9 @@ - + - + @@ -32,10 +32,12 @@ - - - - + + + + + + @@ -44,10 +46,12 @@ - - - - + + + + + + @@ -96,20 +100,20 @@ - - - - + + + + diff --git a/Components/Sources/Components/Components/Editors/Common Views/Input Views/WKEditorMultiButton.swift b/Components/Sources/Components/Components/Editors/Common Views/Input Views/WKEditorMultiButton.swift index fe114a566db..14cd09d366b 100644 --- a/Components/Sources/Components/Components/Editors/Common Views/Input Views/WKEditorMultiButton.swift +++ b/Components/Sources/Components/Components/Editors/Common Views/Input Views/WKEditorMultiButton.swift @@ -126,7 +126,7 @@ final class WKEditorMultiButton: WKComponentView { private func buttonConfigurationUpdateHandler(button: UIButton) { var buttonConfig = button.configuration - buttonConfig?.background.backgroundColor = button.isSelected ? self.theme.editorMultiButtonSelectedBackground : self.theme.midBackground + buttonConfig?.background.backgroundColor = button.isSelected ? self.theme.editorButtonSelectedBackground : self.theme.midBackground button.configuration = buttonConfig } diff --git a/Components/Sources/Components/Components/Editors/Common Views/WKToolbarSeparatorView.swift b/Components/Sources/Components/Components/Editors/Common Views/WKToolbarSeparatorView.swift deleted file mode 100644 index 9051a952535..00000000000 --- a/Components/Sources/Components/Components/Editors/Common Views/WKToolbarSeparatorView.swift +++ /dev/null @@ -1,33 +0,0 @@ -import Foundation - -class WKToolbarSeparatorView: WKComponentView { - var separatorSize = CGSize(width: 1, height: 32) { - didSet { - invalidateIntrinsicContentSize() - } - } - - // MARK: - Lifecycle - - override func awakeFromNib() { - super.awakeFromNib() - - updateColors() - } - - // MARK: - Overrides - - override var intrinsicContentSize: CGSize { - return separatorSize - } - - override func appEnvironmentDidChange() { - updateColors() - } - - // MARK: - Private Helpers - - func updateColors() { - backgroundColor = WKAppEnvironment.current.theme.border - } -} diff --git a/Components/Sources/Components/Extensions/UIImage+Extensions.swift b/Components/Sources/Components/Extensions/UIImage+Extensions.swift new file mode 100644 index 00000000000..6edd0a8f81b --- /dev/null +++ b/Components/Sources/Components/Extensions/UIImage+Extensions.swift @@ -0,0 +1,21 @@ +import Foundation +import UIKit + +public extension UIImage { + static func roundedRectImage(with color: UIColor, cornerRadius: CGFloat, width: CGFloat? = nil, height: CGFloat? = nil) -> UIImage? { + let minDimension = 2 * cornerRadius + 1 + let rect = CGRect(x: 0, y: 0, width: width ?? minDimension, height: height ?? minDimension) + let scale = UIScreen.main.scale + UIGraphicsBeginImageContextWithOptions(rect.size, false, scale) + guard let context = UIGraphicsGetCurrentContext() else { + return nil + } + context.setFillColor(color.cgColor) + let path = UIBezierPath(roundedRect: rect, cornerRadius: cornerRadius) + path.fill() + let capInsets = UIEdgeInsets(top: cornerRadius, left: cornerRadius, bottom: cornerRadius, right: cornerRadius) + let image = UIGraphicsGetImageFromCurrentImageContext()?.resizableImage(withCapInsets: capInsets) + UIGraphicsEndImageContext() + return image + } +} diff --git a/Components/Sources/Components/Style/WKFont.swift b/Components/Sources/Components/Style/WKFont.swift index 8286dd8aa78..36bc71da65a 100644 --- a/Components/Sources/Components/Style/WKFont.swift +++ b/Components/Sources/Components/Style/WKFont.swift @@ -81,7 +81,7 @@ public enum WKFont { } return UIFont(descriptor: descriptor, size: 0) case .editorHeading: - return UIFontMetrics(forTextStyle: .headline).scaledFont(for: UIFont.systemFont(ofSize: 28, weight: .semibold), maximumPointSize: 32, compatibleWith: traitCollection) + return UIFontMetrics(forTextStyle: .headline).scaledFont(for: UIFont.systemFont(ofSize: 28, weight: .semibold), compatibleWith: traitCollection) case .editorSubheading1: return UIFontMetrics(forTextStyle: .headline).scaledFont(for: UIFont.systemFont(ofSize: 26, weight: .semibold), compatibleWith: traitCollection) case .editorSubheading2: diff --git a/Components/Sources/Components/Style/WKIcon.swift b/Components/Sources/Components/Style/WKIcon.swift index 7b9ccf37b70..0731bf3ecd1 100644 --- a/Components/Sources/Components/Style/WKIcon.swift +++ b/Components/Sources/Components/Style/WKIcon.swift @@ -19,9 +19,6 @@ public enum WKIcon { static let thank = UIImage(named: "thank", in: .module, with: nil) static let userContributions = UIImage(named: "user-contributions", in: .module, with: nil) - // Editor-specific icons - public static let separator = UIImage(named: "separator", in: .module, with: nil) - // Project icons static let commons = UIImage(named: "project-icons/commons", in: .module, with: nil) static let wikidata = UIImage(named: "project-icons/wikidata", in: .module, with: nil) @@ -71,7 +68,7 @@ public enum WKSFSymbolIcon { case textFormatSize case textFormat - public static func `for`(symbol: WKSFSymbolIcon, font: WKFont = .subheadline, compatibleWith traitCollection: UITraitCollection = WKAppEnvironment.current.traitCollection, renderingMode: UIImage.RenderingMode = .alwaysTemplate, paletteColors: [UIColor]? = nil) -> UIImage? { + public static func `for`(symbol: WKSFSymbolIcon, font: WKFont = .subheadline, compatibleWith traitCollection: UITraitCollection = WKAppEnvironment.current.traitCollection, paletteColors: [UIColor]? = nil) -> UIImage? { let font = WKFont.for(font) let configuration = UIImage.SymbolConfiguration(font: font) diff --git a/Components/Sources/Components/Style/WKTheme.swift b/Components/Sources/Components/Style/WKTheme.swift index e04449e88f8..63ae01ce1a5 100644 --- a/Components/Sources/Components/Style/WKTheme.swift +++ b/Components/Sources/Components/Style/WKTheme.swift @@ -13,6 +13,7 @@ public struct WKTheme: Equatable { public let accent: UIColor public let destructive: UIColor public let border: UIColor + public let newBorder: UIColor public let paperBackground: UIColor public let midBackground: UIColor public let baseBackground: UIColor @@ -33,7 +34,7 @@ public struct WKTheme: Equatable { public let editorMatchBackground: UIColor public let editorSelectedMatchBackground: UIColor public let editorReplacedMatchBackground: UIColor - public let editorMultiButtonSelectedBackground: UIColor + public let editorButtonSelectedBackground: UIColor public let editorKeyboardShadow: UIColor public static let light = WKTheme( @@ -47,6 +48,7 @@ public struct WKTheme: Equatable { accent: WKColor.green600, destructive: WKColor.red600, border: WKColor.gray400, + newBorder: WKColor.gray300, paperBackground: WKColor.white, midBackground: WKColor.gray100, baseBackground: WKColor.gray200, @@ -67,7 +69,7 @@ public struct WKTheme: Equatable { editorMatchBackground: WKColor.lightMatchBackground, editorSelectedMatchBackground: WKColor.yellow600, editorReplacedMatchBackground: WKColor.matchReplacedBackground, - editorMultiButtonSelectedBackground: WKColor.gray200, + editorButtonSelectedBackground: WKColor.gray200, editorKeyboardShadow: WKColor.gray200 ) @@ -82,6 +84,7 @@ public struct WKTheme: Equatable { accent: WKColor.green600, destructive: WKColor.red700, border: WKColor.taupe200, + newBorder: WKColor.taupe200, paperBackground: WKColor.beige100, midBackground: WKColor.beige300, baseBackground: WKColor.beige400, @@ -102,7 +105,7 @@ public struct WKTheme: Equatable { editorMatchBackground: WKColor.lightMatchBackground, editorSelectedMatchBackground: WKColor.yellow600, editorReplacedMatchBackground: WKColor.matchReplacedBackground, - editorMultiButtonSelectedBackground: WKColor.beige400, + editorButtonSelectedBackground: WKColor.beige400, editorKeyboardShadow: WKColor.taupe200 ) @@ -117,6 +120,7 @@ public struct WKTheme: Equatable { accent: WKColor.green600, destructive: WKColor.red600, border: WKColor.gray650, + newBorder: WKColor.gray500, paperBackground: WKColor.gray675, midBackground: WKColor.gray700, baseBackground: WKColor.gray800, @@ -137,7 +141,7 @@ public struct WKTheme: Equatable { editorMatchBackground: WKColor.darkMatchBackground, editorSelectedMatchBackground: WKColor.yellow600, editorReplacedMatchBackground: WKColor.matchReplacedBackground, - editorMultiButtonSelectedBackground: WKColor.gray600, + editorButtonSelectedBackground: WKColor.gray600, editorKeyboardShadow: WKColor.gray800 ) @@ -152,6 +156,7 @@ public struct WKTheme: Equatable { accent: WKColor.green600, destructive: WKColor.red600, border: WKColor.gray675, + newBorder: WKColor.gray500, paperBackground: WKColor.black, midBackground: WKColor.gray700, baseBackground: WKColor.gray800, @@ -172,7 +177,7 @@ public struct WKTheme: Equatable { editorMatchBackground: WKColor.darkMatchBackground, editorSelectedMatchBackground: WKColor.yellow600, editorReplacedMatchBackground: WKColor.matchReplacedBackground, - editorMultiButtonSelectedBackground: WKColor.gray600, + editorButtonSelectedBackground: WKColor.gray600, editorKeyboardShadow: WKColor.gray700 ) diff --git a/Components/Sources/ComponentsObjC/WKSourceEditorFormatterComment.m b/Components/Sources/ComponentsObjC/WKSourceEditorFormatterComment.m index 0361a7557f2..4e0f7fd0ffb 100644 --- a/Components/Sources/ComponentsObjC/WKSourceEditorFormatterComment.m +++ b/Components/Sources/ComponentsObjC/WKSourceEditorFormatterComment.m @@ -37,6 +37,10 @@ - (instancetype)initWithColors:(WKSourceEditorColors *)colors fonts:(WKSourceEdi - (void)addSyntaxHighlightingToAttributedString:(nonnull NSMutableAttributedString *)attributedString inRange:(NSRange)range { + if (![self canEvaluateAttributedString:attributedString againstRange:range]) { + return; + } + [attributedString removeAttribute:WKSourceEditorCustomKeyCommentMarkup range:range]; [attributedString removeAttribute:WKSourceEditorCustomKeyCommentContent range:range]; @@ -72,6 +76,10 @@ - (void)updateColors:(WKSourceEditorColors *)colors inAttributedString:(NSMutabl NSMutableDictionary *mutContentAttributes = [[NSMutableDictionary alloc] initWithDictionary:self.commentContentAttributes]; [mutContentAttributes setObject:colors.grayForegroundColor forKey:NSForegroundColorAttributeName]; self.commentContentAttributes = [[NSDictionary alloc] initWithDictionary:mutContentAttributes]; + + if (![self canEvaluateAttributedString:attributedString againstRange:range]) { + return; + } [attributedString enumerateAttribute:WKSourceEditorCustomKeyCommentMarkup inRange:range @@ -105,6 +113,11 @@ - (void)updateFonts:(WKSourceEditorFonts *)fonts inAttributedString:(NSMutableAt #pragma mark - Public - (BOOL)attributedString:(NSMutableAttributedString *)attributedString isCommentInRange:(NSRange)range { + + if (![self canEvaluateAttributedString:attributedString againstRange:range]) { + return NO; + } + __block BOOL isContentKey = NO; if (range.length == 0) { @@ -116,8 +129,9 @@ - (BOOL)attributedString:(NSMutableAttributedString *)attributedString isComment isContentKey = YES; } else { // Edge case, check previous character if we are up against closing string - if (attrs[WKSourceEditorCustomKeyCommentMarkup] && attributedString.length > range.location - 1) { - attrs = [attributedString attributesAtIndex:range.location - 1 effectiveRange:nil]; + NSRange newRange = NSMakeRange(range.location - 1, 0); + if (attrs[WKSourceEditorCustomKeyCommentMarkup] && [self canEvaluateAttributedString:attributedString againstRange:newRange]) { + attrs = [attributedString attributesAtIndex:newRange.location effectiveRange:nil]; if (attrs[WKSourceEditorCustomKeyCommentContent] != nil) { isContentKey = YES; } diff --git a/WMF Framework/CommonStrings.swift b/WMF Framework/CommonStrings.swift index be00258701f..2ade487002b 100644 --- a/WMF Framework/CommonStrings.swift +++ b/WMF Framework/CommonStrings.swift @@ -120,7 +120,7 @@ public class CommonStrings: NSObject { @objc public static let dismissButtonTitle = WMFLocalizedString("announcements-dismiss", value: "Dismiss", comment: "Button text indicating a user wants to dismiss an announcement {{Identical|No thanks}}") - @objc public static let textSizeSliderAccessibilityLabel = WMFLocalizedString("reading-themes-controls-accessibility-text-size-slider", value: "Text size slider", comment: "Accessibility label for the text size slider that adjusts article text size.") + @objc public static let textSizeSliderAccessibilityLabel = WMFLocalizedString("reading-themes-controls-accessibility-text-size-slider", value: "Text size slider", comment: "Accessibility label for the text size slider that adjusts text size.") @objc public static let deleteActionTitle = WMFLocalizedString("article-delete", value: "Delete", comment: "Title of the action that deletes the selected articles article.") diff --git a/WMF Framework/Theme.swift b/WMF Framework/Theme.swift index 80fcc6e476c..3721f578c9b 100644 --- a/WMF Framework/Theme.swift +++ b/WMF Framework/Theme.swift @@ -400,6 +400,19 @@ public class Colors: NSObject { return .gray675 } } + + public var newBorder: UIColor { + switch identifier { + case .light, .widgetLight: + return .gray300 + case .sepia: + return .taupe200 + case .dark, .widgetDark: + return .gray500 + case .black: + return .gray500 + } + } @objc public var shadow: UIColor { switch identifier { @@ -875,25 +888,8 @@ public class Theme: NSObject { public static let exploreCardCornerRadius: CGFloat = 10 - static func roundedRectImage(with color: UIColor, cornerRadius: CGFloat, width: CGFloat? = nil, height: CGFloat? = nil) -> UIImage? { - let minDimension = 2 * cornerRadius + 1 - let rect = CGRect(x: 0, y: 0, width: width ?? minDimension, height: height ?? minDimension) - let scale = UIScreen.main.scale - UIGraphicsBeginImageContextWithOptions(rect.size, false, scale) - guard let context = UIGraphicsGetCurrentContext() else { - return nil - } - context.setFillColor(color.cgColor) - let path = UIBezierPath(roundedRect: rect, cornerRadius: cornerRadius) - path.fill() - let capInsets = UIEdgeInsets(top: cornerRadius, left: cornerRadius, bottom: cornerRadius, right: cornerRadius) - let image = UIGraphicsGetImageFromCurrentImageContext()?.resizableImage(withCapInsets: capInsets) - UIGraphicsEndImageContext() - return image - } - @objc public lazy var searchFieldBackgroundImage: UIImage? = { - return Theme.roundedRectImage(with: colors.searchFieldBackground, cornerRadius: 10, height: 36) + return UIImage.roundedRectImage(with: colors.searchFieldBackground, cornerRadius: 10, height: 36) }() @objc public lazy var navigationBarTitleTextAttributes: [NSAttributedString.Key: Any] = { diff --git a/Wikipedia/Code/ReadingThemesControlsViewController.swift b/Wikipedia/Code/ReadingThemesControlsViewController.swift index ae2fc16b4c2..93e954c9d69 100644 --- a/Wikipedia/Code/ReadingThemesControlsViewController.swift +++ b/Wikipedia/Code/ReadingThemesControlsViewController.swift @@ -72,7 +72,7 @@ class ReadingThemesControlsViewController: UIViewController { } brightnessSlider.value = Float(UIScreen.main.brightness) - slider.accessibilityLabel = WMFLocalizedString("reading-themes-controls-accessibility-text-size-slider", value: "Text size slider", comment: "Accessibility label for the text size slider in the Reading Themes Controls popover") + slider.accessibilityLabel = CommonStrings.textSizeSliderAccessibilityLabel brightnessSlider.accessibilityLabel = WMFLocalizedString("reading-themes-controls-accessibility-brightness-slider", value: "Brightness slider", comment: "Accessibility label for the brightness slider in the Reading Themes Controls popover") lightThemeButton.accessibilityLabel = WMFLocalizedString("reading-themes-controls-accessibility-light-theme-button", value: "Light theme", comment: "Accessibility label for the light theme button in the Reading Themes Controls popover") sepiaThemeButton.accessibilityLabel = WMFLocalizedString("reading-themes-controls-accessibility-sepia-theme-button", value: "Sepia theme", comment: "Accessibility label for the sepia theme button in the Reading Themes Controls popover") diff --git a/Wikipedia/Code/SectionEditorNavigationItemController.swift b/Wikipedia/Code/SectionEditorNavigationItemController.swift index bdc828bedd5..4aca85c08b4 100644 --- a/Wikipedia/Code/SectionEditorNavigationItemController.swift +++ b/Wikipedia/Code/SectionEditorNavigationItemController.swift @@ -29,7 +29,7 @@ class SectionEditorNavigationItemController: NSObject, Themeable { redoButton.tintColor = theme.colors.inputAccessoryButtonTint readingThemesControlsButton.tintColor = theme.colors.inputAccessoryButtonTint editNoticesButton.tintColor = theme.colors.inputAccessoryButtonTint - separatorButton.tintColor = theme.colors.chromeText + (separatorButton.customView as? UIImageView)?.tintColor = theme.colors.newBorder progressButton.tintColor = theme.colors.link } @@ -71,11 +71,12 @@ class SectionEditorNavigationItemController: NSObject, Themeable { }() private lazy var separatorButton: UIBarButtonItem = { - let button = UIButton(type: .system) - button.setImage(WKIcon.separator, for: .normal) + let width = (1.0 / UIScreen.main.scale) * 2 + let image = UIImage.roundedRectImage(with: .black, cornerRadius: 0, width: width, height: 32)?.withRenderingMode(.alwaysTemplate) + let button = UIBarButtonItem(customView: UIImageView(image: image)) button.isEnabled = false button.isAccessibilityElement = false - return UIBarButtonItem(customView: button) + return button }() @objc private func progress(_ sender: UIBarButtonItem) { diff --git a/Wikipedia/Localizations/qqq.lproj/Localizable.strings b/Wikipedia/Localizations/qqq.lproj/Localizable.strings index 93086955a9f..fa52ca75e47 100644 --- a/Wikipedia/Localizations/qqq.lproj/Localizable.strings +++ b/Wikipedia/Localizations/qqq.lproj/Localizable.strings @@ -950,7 +950,7 @@ "reading-themes-controls-accessibility-light-theme-button" = "Accessibility label for the light theme button in the Reading Themes Controls popover"; "reading-themes-controls-accessibility-sepia-theme-button" = "Accessibility label for the sepia theme button in the Reading Themes Controls popover"; "reading-themes-controls-accessibility-syntax-highlighting-switch" = "Accessibility text for the syntax highlighting toggle in the Reading Themes Controls popover"; -"reading-themes-controls-accessibility-text-size-slider" = "Accessibility label for the text size slider in the Reading Themes Controls popover"; +"reading-themes-controls-accessibility-text-size-slider" = "Accessibility label for the text size slider that adjusts text size."; "reading-themes-controls-syntax-highlighting" = "Text for syntax highlighting label in the Reading Themes Controls popover"; "reference-section-button-accessibility-label" = "Voiceover label for the top button (that jumps to article's reference section) when viewing a reference's details"; "reference-title" = "Title shown above reference/citation popover. $1 is replaced with the reference link text - i.e. '[1]' {{Identical|Reference}}"; diff --git a/Wikipedia/iOS Native Localizations/en.lproj/Localizable.strings b/Wikipedia/iOS Native Localizations/en.lproj/Localizable.strings index 664de8cd620..ab5f9613a91 100644 Binary files a/Wikipedia/iOS Native Localizations/en.lproj/Localizable.strings and b/Wikipedia/iOS Native Localizations/en.lproj/Localizable.strings differ