mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Nodes - Added hotkey toggle and hotkey enable/disable nodes
This commit is contained in:
1 parent
bef3a84e28
commit
704bdce68b
12 files changed
+387
-3
No files matched your search
@@ -8,6 +8,7 @@ using Avalonia.Data;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using FluentAvalonia.Core;
|
||||
using Humanizer;
|
||||
using Material.Icons;
|
||||
|
||||
@@ -47,7 +48,8 @@ public class HotkeyBox : UserControl
|
||||
Hotkey.Key = (KeyboardKey?) e.Key;
|
||||
Hotkey.Modifiers = (KeyboardModifierKey?) e.KeyModifiers;
|
||||
UpdateDisplayTextBox();
|
||||
|
||||
HotkeyChanged?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
@@ -134,4 +136,13 @@ public class HotkeyBox : UserControl
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the hotkey changes.
|
||||
/// </summary>
|
||||
public event TypedEventHandler<HotkeyBox, EventArgs>? HotkeyChanged;
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -39,6 +39,9 @@
|
||||
|
||||
<dataModelPicker:DataModelPickerButton></dataModelPicker:DataModelPickerButton>
|
||||
<dataModelPicker:DataModelPickerButton Classes="condensed"></dataModelPicker:DataModelPickerButton>
|
||||
|
||||
<controls1:HotkeyBox></controls1:HotkeyBox>
|
||||
<controls1:HotkeyBox Classes="condensed"></controls1:HotkeyBox>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
@@ -110,4 +113,10 @@
|
||||
<Setter Property="MinHeight" Value="24" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="controls1|HotkeyBox.condensed > TextBox#DisplayTextBox">
|
||||
<Setter Property="Padding" Value="6 0" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="MinHeight" Value="24" />
|
||||
</Style>
|
||||
|
||||
</Styles>
|
||||
Reference in new issue
Block a user