From 8f4460953a975d1070936f71c092183aef31915b Mon Sep 17 00:00:00 2001
From: dansmor7 <101892345+dansmor7@users.noreply.github.com>
Date: Fri, 15 Apr 2022 12:26:02 -0700
Subject: [PATCH 1/4] Search boxes visual tweaks
---
src/cascadia/TerminalApp/App.xaml | 8 +-
src/cascadia/TerminalApp/CommandPalette.cpp | 11 -
src/cascadia/TerminalApp/CommandPalette.xaml | 181 +++-------
.../TerminalControl/SearchBoxControl.xaml | 333 +++++++-----------
4 files changed, 182 insertions(+), 351 deletions(-)
diff --git a/src/cascadia/TerminalApp/App.xaml b/src/cascadia/TerminalApp/App.xaml
index 1ddf3e82b0b..6a3d69481fd 100644
--- a/src/cascadia/TerminalApp/App.xaml
+++ b/src/cascadia/TerminalApp/App.xaml
@@ -7,6 +7,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:TA="using:TerminalApp"
xmlns:Toolkit="using:Microsoft.Toolkit.Win32.UI.XamlHost"
+ xmlns:contract8Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 8)"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:TerminalApp"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -48,8 +49,11 @@
9,0,8,0
-
- 12
+
+
diff --git a/src/cascadia/TerminalApp/CommandPalette.cpp b/src/cascadia/TerminalApp/CommandPalette.cpp
index 68a8a6c003c..52edb7a9ffd 100644
--- a/src/cascadia/TerminalApp/CommandPalette.cpp
+++ b/src/cascadia/TerminalApp/CommandPalette.cpp
@@ -39,17 +39,6 @@ namespace winrt::TerminalApp::implementation
_switchToMode(CommandPaletteMode::ActionMode);
- if (CommandPaletteShadow())
- {
- // Hook up the shadow on the command palette to the backdrop that
- // will actually show it. This needs to be done at runtime, and only
- // if the shadow actually exists. ThemeShadow isn't supported below
- // version 18362.
- CommandPaletteShadow().Receivers().Append(_shadowBackdrop());
- // "raise" the command palette up by 16 units, so it will cast a shadow.
- _backdrop().Translation({ 0, 0, 16 });
- }
-
// Whatever is hosting us will enable us by setting our visibility to
// "Visible". When that happens, set focus to our search box.
RegisterPropertyChangedCallback(UIElement::VisibilityProperty(), [this](auto&&, auto&&) {
diff --git a/src/cascadia/TerminalApp/CommandPalette.xaml b/src/cascadia/TerminalApp/CommandPalette.xaml
index 11fa61807c0..d59eb5901ee 100644
--- a/src/cascadia/TerminalApp/CommandPalette.xaml
+++ b/src/cascadia/TerminalApp/CommandPalette.xaml
@@ -6,7 +6,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:SettingsModel="using:Microsoft.Terminal.Settings.Model"
- xmlns:Windows10version1903="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 8)"
+ xmlns:contract8Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 8)"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:TerminalApp"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -24,13 +24,6 @@
-
-
-
-
@@ -142,16 +135,11 @@
Text="{x:Bind Item.KeyChordText, Mode=OneWay}" />
-
-
-
-
-
-
+ FontSize="12"
+ Glyph="" />
@@ -228,48 +216,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ PointerPressed="_backdropPointerPressed">
@@ -417,42 +321,41 @@
-
-
-
+
+
+
+
+
@@ -460,13 +363,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ InnerBorderEdge
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ InnerBorderEdge
-
-
-
+
+
+
+
+
+
+
-
-
-
-
+ Orientation="Horizontal">
+ KeyDown="TextBoxKeyDown" />
+ IsChecked="True">
+ Width="32"
+ Height="32"
+ Margin="4,0"
+ Padding="0"
+ contract8Present:BackgroundSizing="OuterBorderEdge"
+ Click="GoForwardClicked">
@@ -270,14 +193,22 @@
+ Width="32"
+ Height="32"
+ Margin="4,0"
+ Padding="0"
+ contract8Present:BackgroundSizing="OuterBorderEdge">
@@ -207,7 +205,7 @@
Height="32"
Margin="4,0"
Padding="0"
- contract8Present:BackgroundSizing="OuterBorderEdge"
+ BackgroundSizing="OuterBorderEdge"
Click="CloseClick">
Date: Fri, 22 Apr 2022 04:00:56 -0700
Subject: [PATCH 3/4] Fix spacing
---
src/cascadia/TerminalApp/CommandPalette.xaml | 40 ++++++++++----------
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/src/cascadia/TerminalApp/CommandPalette.xaml b/src/cascadia/TerminalApp/CommandPalette.xaml
index a098658d41b..d903b6166c0 100644
--- a/src/cascadia/TerminalApp/CommandPalette.xaml
+++ b/src/cascadia/TerminalApp/CommandPalette.xaml
@@ -304,6 +304,7 @@
Grid.Row="0"
Grid.Column="1"
Margin="8"
+ Padding="0,8,0,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Top"
Background="{ThemeResource FlyoutPresenterBackground}"
@@ -320,25 +321,27 @@
-
-
-
-
-
+
+
+
@@ -353,7 +356,6 @@
Date: Fri, 29 Apr 2022 02:42:25 -0700
Subject: [PATCH 4/4] Fix crash and bug
---
src/cascadia/TerminalApp/CommandPalette.xaml | 23 +++++++++++---------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/cascadia/TerminalApp/CommandPalette.xaml b/src/cascadia/TerminalApp/CommandPalette.xaml
index d903b6166c0..ce1581b3605 100644
--- a/src/cascadia/TerminalApp/CommandPalette.xaml
+++ b/src/cascadia/TerminalApp/CommandPalette.xaml
@@ -316,6 +316,7 @@
Translation="0,0,32">
+
@@ -362,14 +363,6 @@
Text="{x:Bind ParentCommandName, Mode=OneWay}" />
-
-
+
+
+
+