mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 10:16:24 +02: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:
@@ -133,15 +133,12 @@ void createEditShortcutsWindow(HINSTANCE hInst, KeyboardManagerState& keyboardMa
|
||||
newColumn.MaxWidth(3 * KeyboardManagerConstants::ShortcutTableDropDownWidth + 2 * KeyboardManagerConstants::ShortcutTableDropDownSpacing);
|
||||
ColumnDefinition removeColumn;
|
||||
removeColumn.MinWidth(KeyboardManagerConstants::TableRemoveColWidth);
|
||||
ColumnDefinition warnColumn;
|
||||
warnColumn.MinWidth(KeyboardManagerConstants::TableWarningColWidth);
|
||||
shortcutTable.Margin({ 10, 10, 10, 20 });
|
||||
shortcutTable.HorizontalAlignment(HorizontalAlignment::Stretch);
|
||||
shortcutTable.ColumnDefinitions().Append(originalColumn);
|
||||
shortcutTable.ColumnDefinitions().Append(arrowColumn);
|
||||
shortcutTable.ColumnDefinitions().Append(newColumn);
|
||||
shortcutTable.ColumnDefinitions().Append(removeColumn);
|
||||
shortcutTable.ColumnDefinitions().Append(warnColumn);
|
||||
shortcutTable.RowDefinitions().Append(RowDefinition());
|
||||
|
||||
// First header textblock in the header row of the shortcut table
|
||||
@@ -223,14 +220,6 @@ void createEditShortcutsWindow(HINSTANCE hInst, KeyboardManagerState& keyboardMa
|
||||
else
|
||||
{
|
||||
isSuccess = KeyboardManagerHelper::ErrorType::RemapUnsuccessful;
|
||||
// Show tooltip warning on the problematic row
|
||||
uint32_t warningIndex;
|
||||
// 2 at start, 4 in each row, and last element of each row
|
||||
warningIndex = KeyboardManagerConstants::ShortcutTableHeaderCount + ((i + 1) * KeyboardManagerConstants::ShortcutTableColCount) - 1;
|
||||
FontIcon warning = shortcutTable.Children().GetAt(warningIndex).as<FontIcon>();
|
||||
ToolTip t = ToolTipService::GetToolTip(warning).as<ToolTip>();
|
||||
t.Content(box_value(KeyboardManagerHelper::GetErrorMessage(KeyboardManagerHelper::ErrorType::MissingKey)));
|
||||
warning.Visibility(Visibility::Visible);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user