[KBM] Added banded rows (#7787)

* Added banded rows

* Fix build after merge

* accessibility names, capturing static row indexes by lambda

* Fix position of targetApp textbox

* fix wrong path for textbox
This commit is contained in:
Mykhailo Pylyp
2020-11-06 16:24:11 +02:00
committed by GitHub
parent 01e9be9180
commit 8a1d2611d8
13 changed files with 196 additions and 263 deletions

View File

@@ -360,4 +360,12 @@ namespace KeyboardManagerHelper
// If we have at least two keys equal to 'selectedKeyCode' than modifier was repeated
return numberOfSameType > 1;
}
winrt::Windows::Foundation::IInspectable GetWrapped(const winrt::Windows::Foundation::IInspectable& element, double width)
{
StackPanel sp = StackPanel();
sp.Width(width);
sp.Children().Append(element.as<FrameworkElement>());
return sp;
}
}

View File

@@ -107,4 +107,6 @@ namespace KeyboardManagerHelper
// Function to check if a modifier has been repeated in the previous drop downs
bool CheckRepeatedModifier(const std::vector<int32_t>& currentKeys, int selectedKeyCodes);
winrt::Windows::Foundation::IInspectable GetWrapped(const winrt::Windows::Foundation::IInspectable& element, double width);
}

View File

@@ -79,15 +79,18 @@ namespace KeyboardManagerConstants
inline const long ShortcutTableNewColIndex = 2;
inline const long ShortcutTableTargetAppColIndex = 3;
inline const long ShortcutTableRemoveColIndex = 4;
inline const long ShortcutArrowColumnWidth = 90;
inline const DWORD64 ShortcutTableDropDownWidth = 110;
inline const DWORD64 ShortcutTableDropDownSpacing = 10;
inline const long ShortcutOriginColumnWidth = 3 * ShortcutTableDropDownWidth + 2 * ShortcutTableDropDownSpacing;
inline const long ShortcutTargetColumnWidth = 3 * ShortcutTableDropDownWidth + 2 * ShortcutTableDropDownSpacing + 25;
// Drop down height used for both Edit Keyboard and Edit Shortcuts
inline const DWORD64 TableDropDownHeight = 200;
inline const DWORD64 TableArrowColWidth = 20;
inline const DWORD64 TableArrowColWidth = 230;
inline const DWORD64 TableRemoveColWidth = 20;
inline const DWORD64 TableWarningColWidth = 20;
inline const DWORD64 TableTargetAppColWidth = ShortcutTableDropDownWidth + 50;
inline const DWORD64 TableTargetAppColWidth = ShortcutTableDropDownWidth + TableRemoveColWidth * 2;
// Shared style constants for both Remap Table and Shortcut Table
inline const DWORD64 HeaderButtonWidth = 100;