From d5090ee24b528fd83c6848af03c583ce81183e2d Mon Sep 17 00:00:00 2001
From: Arjun Balgovind <32061677+arjunbalgovind@users.noreply.github.com>
Date: Wed, 6 May 2020 08:34:26 -0700
Subject: [PATCH] KBM - Fix all descriptions and text and minor UI tweaks
(#2705)
* Add new text for Remap Keyboard
* Added text in KBM windows
* Tweaked KBM landing page view
* Changed to transparent background
* Tweaked text
* Tweaked text
---
.../Views/KeyboardManagerPage.xaml | 8 ++++----
.../keyboardmanager/ui/EditKeyboardWindow.cpp | 9 ++++++++-
.../keyboardmanager/ui/EditShortcutsWindow.cpp | 13 +++++++++++++
src/modules/keyboardmanager/ui/ShortcutControl.cpp | 1 +
.../keyboardmanager/ui/SingleKeyRemapControl.cpp | 1 +
5 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Views/KeyboardManagerPage.xaml b/src/core/Microsoft.PowerToys.Settings.UI/Views/KeyboardManagerPage.xaml
index b1efe75cff..426c8e3ade 100644
--- a/src/core/Microsoft.PowerToys.Settings.UI/Views/KeyboardManagerPage.xaml
+++ b/src/core/Microsoft.PowerToys.Settings.UI/Views/KeyboardManagerPage.xaml
@@ -139,13 +139,13 @@
-
@@ -169,12 +169,12 @@
-
diff --git a/src/modules/keyboardmanager/ui/EditKeyboardWindow.cpp b/src/modules/keyboardmanager/ui/EditKeyboardWindow.cpp
index a0a7dd70d4..04eba2cd5d 100644
--- a/src/modules/keyboardmanager/ui/EditKeyboardWindow.cpp
+++ b/src/modules/keyboardmanager/ui/EditKeyboardWindow.cpp
@@ -96,8 +96,14 @@ void createEditKeyboardWindow(HINSTANCE hInst, KeyboardManagerState& keyboardMan
// Text block for information about remap key section.
TextBlock keyRemapInfoHeader;
- keyRemapInfoHeader.Text(L"Select the key you want to remap, original key, and it's new output when pressed, the new key");
+ keyRemapInfoHeader.Text(L"Select the key you want to change (Original Key) and the key you want it to become (New Key).");
keyRemapInfoHeader.Margin({ 10, 0, 0, 10 });
+ keyRemapInfoHeader.FontWeight(Text::FontWeights::SemiBold());
+
+ TextBlock keyRemapInfoExample;
+ keyRemapInfoExample.Text(L"For example, if you want to press A and get B, Key A would be your \"Original Key\" and Key B would be your \"New Key\".");
+ keyRemapInfoExample.Margin({ 10, 0, 0, 20 });
+ keyRemapInfoExample.FontStyle(Text::FontStyle::Italic);
// Table to display the key remaps
Grid keyRemapTable;
@@ -304,6 +310,7 @@ void createEditKeyboardWindow(HINSTANCE hInst, KeyboardManagerState& keyboardMan
StackPanel mappingsPanel;
mappingsPanel.Children().Append(keyRemapInfoHeader);
+ mappingsPanel.Children().Append(keyRemapInfoExample);
mappingsPanel.Children().Append(keyRemapTable);
mappingsPanel.Children().Append(addRemapKey);
diff --git a/src/modules/keyboardmanager/ui/EditShortcutsWindow.cpp b/src/modules/keyboardmanager/ui/EditShortcutsWindow.cpp
index afc159389f..6c6473e06c 100644
--- a/src/modules/keyboardmanager/ui/EditShortcutsWindow.cpp
+++ b/src/modules/keyboardmanager/ui/EditShortcutsWindow.cpp
@@ -95,6 +95,17 @@ void createEditShortcutsWindow(HINSTANCE hInst, KeyboardManagerState& keyboardMa
PostMessage(_hWndEditShortcutsWindow, WM_CLOSE, 0, 0);
});
+ // Text block for information about remap key section.
+ TextBlock shortcutRemapInfoHeader;
+ shortcutRemapInfoHeader.Text(L"Select shortcut you want to change (Original Shortcut) and the shortcut (New Shortcut) you want it to invoke.");
+ shortcutRemapInfoHeader.Margin({ 10, 0, 0, 10 });
+ shortcutRemapInfoHeader.FontWeight(Text::FontWeights::SemiBold());
+
+ TextBlock shortcutRemapInfoExample;
+ shortcutRemapInfoExample.Text(L"For example, if you want Ctrl+C to paste, Ctrl+C is the Original Shortcut and Ctrl+V is the New Shortcut.");
+ shortcutRemapInfoExample.Margin({ 10, 0, 0, 20 });
+ shortcutRemapInfoExample.FontStyle(Text::FontStyle::Italic);
+
// Table to display the shortcuts
Windows::UI::Xaml::Controls::Grid shortcutTable;
ColumnDefinition firstColumn;
@@ -228,6 +239,8 @@ void createEditShortcutsWindow(HINSTANCE hInst, KeyboardManagerState& keyboardMa
});
StackPanel mappingsPanel;
+ mappingsPanel.Children().Append(shortcutRemapInfoHeader);
+ mappingsPanel.Children().Append(shortcutRemapInfoExample);
mappingsPanel.Children().Append(shortcutTable);
mappingsPanel.Children().Append(addShortcut);
diff --git a/src/modules/keyboardmanager/ui/ShortcutControl.cpp b/src/modules/keyboardmanager/ui/ShortcutControl.cpp
index 254cce47e6..6323ed7442 100644
--- a/src/modules/keyboardmanager/ui/ShortcutControl.cpp
+++ b/src/modules/keyboardmanager/ui/ShortcutControl.cpp
@@ -40,6 +40,7 @@ void ShortcutControl::AddNewShortcutControlRow(Grid& parent, std::vector();
uint32_t index;
diff --git a/src/modules/keyboardmanager/ui/SingleKeyRemapControl.cpp b/src/modules/keyboardmanager/ui/SingleKeyRemapControl.cpp
index 422482e04a..3cb45f81f8 100644
--- a/src/modules/keyboardmanager/ui/SingleKeyRemapControl.cpp
+++ b/src/modules/keyboardmanager/ui/SingleKeyRemapControl.cpp
@@ -63,6 +63,7 @@ void SingleKeyRemapControl::AddNewControlKeyRemapRow(Grid& parent, std::vector();
uint32_t index;