diff --git a/src/LogExpert.Core/Config/Preferences.cs b/src/LogExpert.Core/Config/Preferences.cs index f5206b88..c3125158 100644 --- a/src/LogExpert.Core/Config/Preferences.cs +++ b/src/LogExpert.Core/Config/Preferences.cs @@ -19,7 +19,7 @@ public SelectionHighlightSettings SelectionHighlight set => _selectionHighlight = value ?? new(); } - /// Custom-color palette shared by the Highlight Entry color pickers, as ColorDialog.CustomColors values. + /// Custom-color palette shared by the Highlight dialog's color pickers, as ColorDialog.CustomColors values. public int[] HighlightCustomColors { get => _highlightCustomColors; diff --git a/src/LogExpert.UI.Tests/Dialogs/HighlightDialogEntryTests.cs b/src/LogExpert.UI.Tests/Dialogs/HighlightDialogEntryTests.cs index 6d640e4e..9ce24eff 100644 --- a/src/LogExpert.UI.Tests/Dialogs/HighlightDialogEntryTests.cs +++ b/src/LogExpert.UI.Tests/Dialogs/HighlightDialogEntryTests.cs @@ -197,6 +197,44 @@ public void EditorCancel_DiscardsItsPalette () Assert.That(_dialog.CustomColors, Is.EqualTo(new[] { 0x00102030 })); } + [Test] + public void SelectionColorPickerOk_SharesThePaletteWithTheEntryEditors () + { + int[] shown = null; + int[] received = null; + _dialog.ShowColorDialog = picker => + { + shown = picker.CustomColors; + picker.CustomColors = [0x00ABCDEF]; + return DialogResult.OK; + }; + Find