Repository: microsoft/terminal (language: cpp)

Issue:
[1.17] Launch Params in SUI needs a little cleanup
# Bug 1: Launch Params resizes as you type X/Y val

<details>
<summary>Duped to  #13495</summary>

<img width="358" alt="image" src="https://user-images.githubusercontent.com/11050425/207737443-104ee2c6-c331-4fe6-b369-0c8232c059eb.png">

Then when you click off of it, it looks like the num box buttons appear over the text? Weird. 
<img width="93" alt="image" src="https://user-images.githubusercontent.com/11050425/207737476-59c3a7cc-5828-4933-a8e5-89d28dba7d9a.png">

</details>

# Bug 2: rework Launch Params preview
I still feel like "Default,Default" should be something like… 

"Let system position window" or "system position" or whatever 

Should "Use system default" be renamed to "Let system position window" 


Discussion / hints:
I think bug 1 may be a dupe of #13495 - the history size input does exactly the same thing.
> I think bug 1 may be a dupe of https://github.com/microsoft/terminal/issues/13495

Yes it is

> Should "Use system default" be renamed to "Let system position window"

absolutely yes
@zadjii-msft  Hmm... Since #13495 is tracking upgrading to WinUI 2.8 (which would fix the bug, of course, but it's a lot of extra work). How do we feel about changing the `SpinButtonPlacementMode` from `Inline` to `Compact`? I assume that fixes the problem and it would be super simple.
> How do we feel about changing the SpinButtonPlacementMode from Inline to Compact? I assume that fixes the problem and it would be super simple.

I mean, _would it_? I'm honestly fine leaving that half of the bug as is (and waiting for eventually figuring out winui 2.8), it only happens with huge numbers anyways, yea?

Fix patch:
diff --git a/src/cascadia/TerminalSettingsEditor/CommonResources.xaml b/src/cascadia/TerminalSettingsEditor/CommonResources.xaml
index e51b358b75b..b274e3cf58c 100644
--- a/src/cascadia/TerminalSettingsEditor/CommonResources.xaml
+++ b/src/cascadia/TerminalSettingsEditor/CommonResources.xaml
@@ -131,7 +131,7 @@
     <!--  Number Box  -->
     <Style x:Key="NumberBoxSettingStyle"
            TargetType="muxc:NumberBox">
-        <Setter Property="SpinButtonPlacementMode" Value="Inline" />
+        <Setter Property="SpinButtonPlacementMode" Value="Compact" />
         <Setter Property="HorizontalAlignment" Value="Left" />
     </Style>
 
diff --git a/src/cascadia/TerminalSettingsEditor/Launch.xaml b/src/cascadia/TerminalSettingsEditor/Launch.xaml
index 3c4bb75b2a0..0669a17bd9f 100644
--- a/src/cascadia/TerminalSettingsEditor/Launch.xaml
+++ b/src/cascadia/TerminalSettingsEditor/Launch.xaml
@@ -227,25 +227,41 @@
                                    Grid.Row="1"
                                    Grid.Column="0"
                                    VerticalAlignment="Center" />
-                        <StackPanel Grid.Row="1"
-                                    Grid.Column="1">
-                            <StackPanel Orientation="Horizontal"
-                                        Spacing="4">
-                                <muxc:NumberBox x:Name="PosXBox"
-                                                x:Uid="Globals_InitialPosXBox"
-                                                IsEnabled="{x:Bind local:Converters.InvertBoolean(ViewModel.UseDefaultLaunchPosition), Mode=OneWay}"
-                                                Style="{StaticResource LaunchSizeNumberBoxStyle}"
-                                                Value="{x:Bind ViewModel.InitialPosX, Mode=TwoWay}" />
-                                <muxc:NumberBox x:Name="PosYBox"
-                                                x:Uid="Globals_InitialPosYBox"
-                                                IsEnabled="{x:Bind local:Converters.InvertBoolean(ViewModel.UseDefaultLaunchPosition), Mode=OneWay}"
-                                                Style="{StaticResource LaunchSizeNumberBoxStyle}"
-                                                Value="{x:Bind ViewModel.InitialPosY, Mode=TwoWay}" />
-                            </StackPanel>
+                        <Grid Grid.Row="1"
+                              Grid.Column="1"
+                              ColumnSpacing="4">
+                            <Grid.RowDefinitions>
+                                <RowDefinition Height="Auto" />
+                                <RowDefinition Height="Auto" />
+                            </Grid.RowDefinitions>
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition Width="*" />
+                                <ColumnDefinition Width="*" />
+                            </Grid.ColumnDefinitions>
+                            <!--  Match the width of these NumberBoxes to the Width of the LaunchModeComboBox above minus the Grid's ColumnSpacing  -->
+                            <muxc:NumberBox x:Name="PosXBox"
+                                            x:Uid="Globals_InitialPosXBox"
+                                            Grid.Row="0"
+                                            Grid.Column="0"
+                                            Width="118"
+                                            IsEnabled="{x:Bind local:Converters.InvertBoolean(ViewModel.UseDefaultLaunchPosition), Mode=OneWay}"
+                                            Style="{StaticResource LaunchSizeNumberBoxStyle}"
+                                            Value="{x:Bind ViewModel.InitialPosX, Mode=TwoWay}" />
+                            <muxc:NumberBox x:Name="PosYBox"
+                                            x:Uid="Globals_InitialPosYBox"
+                                            Grid.Row="0"
+                                            Grid.Column="1"
+                                            Width="118"
+                                            IsEnabled="{x:Bind local:Converters.InvertBoolean(ViewModel.UseDefaultLaunchPosition), Mode=OneWay}"
+                                            Style="{StaticResource LaunchSizeNumberBoxStyle}"
+                                            Value="{x:Bind ViewModel.InitialPosY, Mode=TwoWay}" />
                             <CheckBox x:Name="UseDefaultLaunchPositionCheckbox"
                                       x:Uid="Globals_DefaultLaunchPositionCheckbox"
+                                      Grid.Row="1"
+                                      Grid.Column="0"
+                                      Grid.ColumnSpan="2"
                                       IsChecked="{x:Bind ViewModel.UseDefaultLaunchPosition, Mode=TwoWay}" />
-                        </StackPanel>
+                        </Grid>
                         <TextBlock x:Uid="Globals_CenterOnLaunch"
                                    Grid.Row="2"
                                    Grid.Column="0"
diff --git a/src/cascadia/TerminalSettingsEditor/LaunchViewModel.cpp b/src/cascadia/TerminalSettingsEditor/LaunchViewModel.cpp
index ae4c2120f88..425d84299b9 100644
--- a/src/cascadia/TerminalSettingsEditor/LaunchViewModel.cpp
+++ b/src/cascadia/TerminalSettingsEditor/LaunchViewModel.cpp
@@ -49,7 +49,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
         // Append the launch position part
         if (UseDefaultLaunchPosition())
         {
-            result = fmt::format(L"{}, {}", launchModeString, RS_(L"Globals_LaunchModeDefault/Content"));
+            result = fmt::format(L"{}, {}", launchModeString, RS_(L"Globals_DefaultLaunchPositionCheckbox/Content"));
         }
         else
         {
diff --git a/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw b/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
index 8235686daac..9699e45dba2 100644
--- a/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
+++ b/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
@@ -356,8 +356,8 @@
     <comment>The string to be displayed when there is no current value in the y-coordinate number box.</comment>
   </data>
   <data name="Globals_DefaultLaunchPositionCheckbox.Content" xml:space="preserve">
-    <value>Use system default</value>
-    <comment>A checkbox for the "launch position" setting. Toggling this control sets the launch position to the system default.</comment>
+    <value>Let Windows decide</value>
+    <comment>A checkbox for the "launch position" setting. Toggling this control sets the launch position to whatever the Windows operating system decides.</comment>
   </data>
   <data name="Globals_DefaultLaunchPositionCheckbox.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
     <value>If enabled, use the system default launch position.</value>
@@ -1569,4 +1569,4 @@
     <value>Warn when closing more than one tab</value>
     <comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
   </data>
-</root>
+</root>
\ No newline at end of file


Test patch: