Skip to content
This repository was archived by the owner on Nov 25, 2023. It is now read-only.

Commit f010f36

Browse files
committed
Fix background color converter
1 parent 6ad486f commit f010f36

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/InvvardDev.EZLayoutDisplay.Desktop/View/Converter/KeyCategoryToBrushConverter.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ public KeyCategoryToBrushConverter()
3030
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
3131
{
3232
SolidColorBrush brush = null;
33-
if (value is KeyCategory category)
33+
if (value is KeyDisplayMode displayMode)
3434
{
35-
brush = category switch
35+
brush = displayMode switch
3636
{
37-
KeyCategory.ColorControl => ColorControlBackgroundBrush,
38-
KeyCategory.CustomLabel => CustomLabelBackgroundBrush,
39-
KeyCategory.DualFunction => DualFunctionBackgroundBrush,
40-
KeyCategory.Macro => MacroBackgroundBrush,
41-
KeyCategory.Modifier => ModifierBackgroundBrush,
37+
KeyDisplayMode.ColorControl => ColorControlBackgroundBrush,
38+
KeyDisplayMode.CustomLabel => CustomLabelBackgroundBrush,
39+
KeyDisplayMode.DualFunction => DualFunctionBackgroundBrush,
40+
KeyDisplayMode.Macro => MacroBackgroundBrush,
41+
KeyDisplayMode.Modifier => ModifierBackgroundBrush,
4242
_ => DefaultBackgroundBrush
4343
};
4444
}

0 commit comments

Comments
 (0)