From 7e1571a4932ce9a46c685bf52ab22784647f1419 Mon Sep 17 00:00:00 2001 From: CMK Date: Thu, 17 Jun 2021 18:21:18 +0800 Subject: [PATCH] fix: action buttons for status missing highlighed state --- .../Share/View/ToolBar/ActionToolBarContainer.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Mastodon/Scene/Share/View/ToolBar/ActionToolBarContainer.swift b/Mastodon/Scene/Share/View/ToolBar/ActionToolBarContainer.swift index f10e5594..794f9c76 100644 --- a/Mastodon/Scene/Share/View/ToolBar/ActionToolBarContainer.swift +++ b/Mastodon/Scene/Share/View/ToolBar/ActionToolBarContainer.swift @@ -17,10 +17,10 @@ protocol ActionToolbarContainerDelegate: AnyObject { final class ActionToolbarContainer: UIView { - let replyButton = HitTestExpandedButton() - let reblogButton = HitTestExpandedButton() - let favoriteButton = HitTestExpandedButton() - let moreButton = HitTestExpandedButton() + let replyButton = HighlightDimmableButton() + let reblogButton = HighlightDimmableButton() + let favoriteButton = HighlightDimmableButton() + let moreButton = HighlightDimmableButton() var isReblogButtonHighlight: Bool = false { didSet { isReblogButtonHighlightStateDidChange(to: isReblogButtonHighlight) } @@ -97,6 +97,7 @@ extension ActionToolbarContainer { button.titleLabel?.font = .monospacedDigitSystemFont(ofSize: 12, weight: .regular) button.setTitle("", for: .normal) button.setTitleColor(.secondaryLabel, for: .normal) + button.expandEdgeInsets = UIEdgeInsets(top: -10, left: -10, bottom: -10, right: -10) button.setInsets(forContentPadding: .zero, imageTitlePadding: style.buttonTitleImagePadding) }