diff --git a/HandheldCompanion/Managers/Classes/Hotkey.cs b/HandheldCompanion/Managers/Classes/Hotkey.cs index 41e290b91..d48269fcb 100644 --- a/HandheldCompanion/Managers/Classes/Hotkey.cs +++ b/HandheldCompanion/Managers/Classes/Hotkey.cs @@ -191,7 +191,7 @@ public Button GetDeleteButton() public void UpdateButtons() { - string content = string.Empty; + SimpleStackPanel content = new() { Orientation = Orientation.Horizontal, Spacing = 6 }; bool haskey = !string.IsNullOrEmpty(inputsChord.key); bool hasbuttons = (inputsChord.buttons != SharpDX.XInput.GamepadButtonFlags.None); @@ -199,14 +199,19 @@ public void UpdateButtons() string buttons = EnumUtils.GetDescriptionFromEnumValue(inputsChord.buttons); if (haskey && hasbuttons) - content = string.Join(" + ", inputsChord.key, buttons); + content.Children.Add(new TextBlock() { Text = string.Join(" + ", inputsChord.key, buttons) }); else if (haskey) - content = inputsChord.key; + content.Children.Add(new TextBlock() { Text = inputsChord.key }); else if (hasbuttons) - content = buttons; + content.Children.Add(new TextBlock() { Text = buttons }); - if (!string.IsNullOrEmpty(content)) - content = string.Join(" ", content, inputsChord.type); + if (content.Children.Count > 0) + { + TextBlock type = new TextBlock() { Text = inputsChord.type.ToString() }; + type.SetResourceReference(Control.ForegroundProperty, "AccentButtonBackground"); + + content.Children.Add(type); + } mainButton.Content = content;