From 6b4529a69eee079d537cdbcf2c2d916cabc1838f Mon Sep 17 00:00:00 2001 From: Toni Sevener Date: Fri, 15 Dec 2023 08:37:01 -0600 Subject: [PATCH] Apply reference selection state to toolbars --- .../Expanding/WKEditorToolbarExpandingView.swift | 1 + .../Highlight/WKEditorToolbarHighlightView.swift | 1 + .../Main/Plain Toolbar Table Item/WKEditorToolbarPlainView.swift | 1 + 3 files changed, 3 insertions(+) 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 e27cb10965f..8d499b372d7 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 @@ -151,6 +151,7 @@ class WKEditorToolbarExpandingView: WKEditorToolbarView { } templateButton.isSelected = selectionState.isHorizontalTemplate + referenceButton.isSelected = selectionState.isHorizontalReference cursorRightButton.accessibilityLabel = WKSourceEditorLocalizedStrings.current.accessibilityLabelButtonCursorRight } diff --git a/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Highlight/WKEditorToolbarHighlightView.swift b/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Highlight/WKEditorToolbarHighlightView.swift index 52cc9f48845..792dec3631a 100644 --- a/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Highlight/WKEditorToolbarHighlightView.swift +++ b/Components/Sources/Components/Components/Editors/Common Views/Input Accessory Views/Highlight/WKEditorToolbarHighlightView.swift @@ -81,6 +81,7 @@ class WKEditorToolbarHighlightView: WKEditorToolbarView { boldButton.isSelected = selectionState.isBold italicsButton.isSelected = selectionState.isItalics templateButton.isSelected = selectionState.isHorizontalTemplate + referenceButton.isSelected = selectionState.isHorizontalReference } // MARK: - Button Actions diff --git a/Components/Sources/Components/Components/Editors/Common Views/Input Views/Main/Plain Toolbar Table Item/WKEditorToolbarPlainView.swift b/Components/Sources/Components/Components/Editors/Common Views/Input Views/Main/Plain Toolbar Table Item/WKEditorToolbarPlainView.swift index f2b20695192..b1a8e02df6b 100644 --- a/Components/Sources/Components/Components/Editors/Common Views/Input Views/Main/Plain Toolbar Table Item/WKEditorToolbarPlainView.swift +++ b/Components/Sources/Components/Components/Editors/Common Views/Input Views/Main/Plain Toolbar Table Item/WKEditorToolbarPlainView.swift @@ -55,6 +55,7 @@ class WKEditorToolbarPlainView: WKEditorToolbarView { boldButton.isSelected = selectionState.isBold italicsButton.isSelected = selectionState.isItalics templateButton.isSelected = selectionState.isHorizontalTemplate + referenceButton.isSelected = selectionState.isHorizontalReference } // MARK: Button Actions