Skip to content

Commit

Permalink
Allows negative values in launch parameters (#15941)
Browse files Browse the repository at this point in the history
Added a style that allows negative values in the launch position
parameters.

## PR Checklist
- [x] Closes #15832

(cherry picked from commit 5d300b2)
Service-Card-Id: 90451445
Service-Version: 1.18
  • Loading branch information
codecruisedor authored and DHowett committed Sep 22, 2023
1 parent cea9705 commit 3cb78b2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/cascadia/TerminalSettingsEditor/Launch.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
<Setter Property="LargeChange" Value="10" />
<Setter Property="Minimum" Value="1" />
</Style>
<Style x:Key="LaunchPositionNumberBoxStyle"
BasedOn="{StaticResource NumberBoxSettingStyle}"
TargetType="muxc:NumberBox">
<Setter Property="SmallChange" Value="1" />
<Setter Property="LargeChange" Value="10" />
<Setter Property="Minimum" Value="-2147483648" />
<Setter Property="Maximum" Value="2147483647" />
</Style>
</ResourceDictionary>
</Page.Resources>

Expand Down Expand Up @@ -242,15 +250,15 @@
Grid.Column="0"
Width="118"
IsEnabled="{x:Bind local:Converters.InvertBoolean(ViewModel.UseDefaultLaunchPosition), Mode=OneWay}"
Style="{StaticResource LaunchSizeNumberBoxStyle}"
Style="{StaticResource LaunchPositionNumberBoxStyle}"
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}"
Style="{StaticResource LaunchPositionNumberBoxStyle}"
Value="{x:Bind ViewModel.InitialPosY, Mode=TwoWay}" />
<CheckBox x:Name="UseDefaultLaunchPositionCheckbox"
x:Uid="Globals_DefaultLaunchPositionCheckbox"
Expand Down

0 comments on commit 3cb78b2

Please sign in to comment.