mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
Change warnings from icon to flyouts but it no longer interrupts searching (#2816)
* Fixed foreground issue and added arrow * Tweaked Remap Keyboard UI * Fix errors in warning handling and update UI layout * Tweaked sizes and centered to screen * Fixed flyouts appearing on search for Single key remaps * Fixed flyouts appearing on search for Shortcut remaps * Remove warning exclamation icon and tooltip * Fixed a bug where setting None on a drop down which would create a shortcut with a conflict would cause a crash * Remove IsTypeKey logic * Changed warning text * Resolve comments
This commit is contained in:
@@ -11,10 +11,10 @@ private:
|
||||
HKL previousLayout = 0;
|
||||
// Stores the key code list
|
||||
std::vector<DWORD> keyCodeList;
|
||||
// Stores the warning control
|
||||
FontIcon warning;
|
||||
// Stores the tooltip for the warning control
|
||||
ToolTip toolTip;
|
||||
// Stores the flyout warning message
|
||||
TextBlock warningMessage;
|
||||
// Stores the flyout attached to the current drop down
|
||||
Flyout warningFlyout;
|
||||
|
||||
// Function to set properties apart from the SelectionChanged event handler
|
||||
void SetDefaultProperties(bool isShortcut);
|
||||
@@ -26,9 +26,8 @@ public:
|
||||
// Pointer to the keyboard manager state
|
||||
static KeyboardManagerState* keyboardManagerState;
|
||||
|
||||
// Constructor
|
||||
KeyDropDownControl(bool isShortcut, FontIcon warning, ToolTip toolTip) :
|
||||
warning(warning), toolTip(toolTip)
|
||||
// Constructor - the last default parameter should be passed as false only if it originates from Type shortcut or when an old shortcut is reloaded
|
||||
KeyDropDownControl(bool isShortcut)
|
||||
{
|
||||
SetDefaultProperties(isShortcut);
|
||||
}
|
||||
@@ -46,7 +45,7 @@ public:
|
||||
ComboBox GetComboBox();
|
||||
|
||||
// Function to add a drop down to the shortcut stack panel
|
||||
static void AddDropDown(Grid table, StackPanel shortcutControl, StackPanel parent, const int colIndex, std::vector<std::vector<Shortcut>>& shortcutRemapBuffer, std::vector<std::unique_ptr<KeyDropDownControl>>& keyDropDownControlObjects, FontIcon warning, ToolTip toolTip);
|
||||
static void AddDropDown(Grid table, StackPanel shortcutControl, StackPanel parent, const int colIndex, std::vector<std::vector<Shortcut>>& shortcutRemapBuffer, std::vector<std::unique_ptr<KeyDropDownControl>>& keyDropDownControlObjects);
|
||||
|
||||
// Function to get the list of key codes from the shortcut combo box stack panel
|
||||
std::vector<DWORD> GetKeysFromStackPanel(StackPanel parent);
|
||||
|
||||
Reference in New Issue
Block a user