From cf9a2e51f66661def8dc6e65f695b12096844991 Mon Sep 17 00:00:00 2001 From: James Frost Date: Fri, 30 Jun 2017 17:05:10 +0100 Subject: [PATCH 1/2] FormatBar: Include overflow item when updating tint colors --- Aztec/Classes/GUI/FormatBar/FormatBar.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Aztec/Classes/GUI/FormatBar/FormatBar.swift b/Aztec/Classes/GUI/FormatBar/FormatBar.swift index 8e4ebd3de..23b486580 100644 --- a/Aztec/Classes/GUI/FormatBar/FormatBar.swift +++ b/Aztec/Classes/GUI/FormatBar/FormatBar.swift @@ -144,7 +144,7 @@ open class FormatBar: UIView { /// override open var tintColor: UIColor? { didSet { - for item in items { + for item in items + [overflowToggleItem] { item.normalTintColor = tintColor } } @@ -155,7 +155,7 @@ open class FormatBar: UIView { /// open var selectedTintColor: UIColor? { didSet { - for item in items { + for item in items + [overflowToggleItem] { item.selectedTintColor = selectedTintColor } } @@ -166,7 +166,7 @@ open class FormatBar: UIView { /// open var highlightedTintColor: UIColor? { didSet { - for item in items { + for item in items + [overflowToggleItem] { item.highlightedTintColor = highlightedTintColor } } @@ -177,7 +177,7 @@ open class FormatBar: UIView { /// open var disabledTintColor: UIColor? { didSet { - for item in items { + for item in items + [overflowToggleItem] { item.disabledTintColor = disabledTintColor } } From dd8eb1ee1fc4181323f8f8717b0880195ee49f24 Mon Sep 17 00:00:00 2001 From: James Frost Date: Fri, 30 Jun 2017 17:05:25 +0100 Subject: [PATCH 2/2] FormatBar: Don't automatically adjust images on highlight / disabled --- Aztec/Classes/GUI/FormatBar/FormatBarItem.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Aztec/Classes/GUI/FormatBar/FormatBarItem.swift b/Aztec/Classes/GUI/FormatBar/FormatBarItem.swift index f88dd22b3..83873bc08 100644 --- a/Aztec/Classes/GUI/FormatBar/FormatBarItem.swift +++ b/Aztec/Classes/GUI/FormatBar/FormatBarItem.swift @@ -114,8 +114,8 @@ open class FormatBarItem: UIButton { super.init(frame: frame) self.setImage(image, for: UIControlState()) - self.adjustsImageWhenDisabled = true - self.adjustsImageWhenHighlighted = true + self.adjustsImageWhenDisabled = false + self.adjustsImageWhenHighlighted = false }