Skip to content

Commit

Permalink
Bind launch size
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-zamora committed Nov 30, 2020
1 parent f42737b commit a7ac47c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 38 deletions.
66 changes: 41 additions & 25 deletions src/cascadia/TerminalSettingsEditor/Launch.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ the MIT License. See LICENSE in the project root for license information. -->
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>

<StackPanel Grid.Row="1" Grid.Column="0" Margin="0,0,100,0">
<ComboBox x:Uid="Globals_DefaultProfile"
x:Name="DefaultProfile"
Expand Down Expand Up @@ -76,31 +76,47 @@ the MIT License. See LICENSE in the project root for license information. -->
ItemsSource="{x:Bind LaunchSizeList}"
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"/>

<!--TODO: Converter here for launch position into the cols and rows number boxes-->
<!--<TextBox x:Uid="Globals_LaunchPosition" Text="{x:Bind GlobalSettings.LaunchPosition, Mode=TwoWay}" Margin="0,0,0,20" FontSize="15" ToolTipService.Placement="Mouse"/>
<Controls:NumberBox x:Uid="Globals_InitialCols"
x:Name="InitialCols"
Value="{x:Bind GlobalSettings.InitialCols, Mode=TwoWay}"
Margin="0,0,0,20"
FontSize="15"
SpinButtonPlacementMode="Compact"
SmallChange="10"
LargeChange="100"
ToolTipService.Placement="Mouse"/>
<Controls:NumberBox x:Uid="Globals_InitialRows"
x:Name="InitialRows"
Value="{x:Bind GlobalSettings.InitialRows, Mode=TwoWay}"
Margin="0,0,0,20"
FontSize="15"
SpinButtonPlacementMode="Compact"
SmallChange="10"
LargeChange="100"
ToolTipService.Placement="Mouse"/>-->
<Grid Margin="0,0,0,20">
<Grid.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="15"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="0,0,5,0"/>
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>

<TextBlock x:Uid="Globals_InitialSize"
Grid.Row="0" Grid.Column="0"
Grid.ColumnSpan="2"/>

<StackPanel Orientation="Horizontal"
Grid.Row="1" Grid.Column="0"
Margin="0,0,10,0">
<TextBlock x:Uid="Globals_InitialCols"/>
<Controls:NumberBox Value="{x:Bind State.Settings.GlobalSettings.InitialCols, Mode=TwoWay}"
SmallChange="10"
LargeChange="100"
Margin="0"/>
</StackPanel>

<StackPanel Orientation="Horizontal"
Grid.Row="1" Grid.Column="1">
<TextBlock x:Uid="Globals_InitialRows"/>
<Controls:NumberBox Value="{x:Bind State.Settings.GlobalSettings.InitialRows, Mode=TwoWay}"
SmallChange="10"
LargeChange="100"
Margin="0"/>
</StackPanel>
</Grid>
</StackPanel>
<!--TODO: Setting doesn't exist?-->
<!--<StackPanel Grid.Row="1" Grid.Column="1" Margin="0,0,100,0">
<CheckBox x:Uid="Globals_DisableDynamicProfiles" IsChecked="{x:Bind GlobalSettings.DisableDynamicProfiles, Mode=TwoWay}" Margin="0,0,0,20" FontSize="15" ToolTipService.Placement="Mouse" />
</StackPanel>-->
</Grid>
</ScrollViewer>
</Page>
23 changes: 10 additions & 13 deletions src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -217,26 +217,20 @@
<data name="Globals_ForceFullRepaint.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>When checked, the terminal will redraw the entire screen each frame. When unchecked, the terminal will render only the updates to the screen between frames.</value>
</data>
<data name="Globals_InitialCols.Header" xml:space="preserve">
<value>Columns on first launch (in characters)</value>
<data name="Globals_InitialCols.Text" xml:space="preserve">
<value>Columns:</value>
</data>
<data name="Globals_InitialCols.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>The number of columns displayed in the window upon first load.</value>
<value>The number of columns displayed in the window upon first load. Measuered in characters.</value>
</data>
<data name="Globals_InitialRows.Header" xml:space="preserve">
<value>Rows on first launch (in characters)</value>
<data name="Globals_InitialRows.Text" xml:space="preserve">
<value>Rows:</value>
</data>
<data name="Globals_InitialRows.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>The number of rows displayed in the window upon first load.</value>
</data>
<data name="Globals_LaunchPosition.Header" xml:space="preserve">
<value>Launch position</value>
</data>
<data name="Globals_LaunchPosition.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>The position of the top left corner of the window upon first load. On a system with multiple displays, these coordinates are relative to the top left of the primary display.</value>
<value>The number of rows displayed in the window upon first load. Measured in characters.</value>
</data>
<data name="Globals_LaunchSize.Header" xml:space="preserve">
<value>Launch size</value>
<value>Launch mode</value>
</data>
<data name="Globals_LaunchSize.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Defines whether the terminal will launch as maximized, full screen, or in a window. Setting this to "Focus" is equivalent to launching the terminal in the "Default" mode, but with the focus mode enabled. Similarly, setting this to "Maximized Focus" will result in launching the terminal in a maximized window with the focus mode enabled.</value>
Expand Down Expand Up @@ -716,4 +710,7 @@
<value>Thin</value>
<comment>This is the formal name for a font weight.</comment>
</data>
<data name="Globals_InitialSize.Text" xml:space="preserve">
<value>Launch size</value>
</data>
</root>

1 comment on commit a7ac47c

@github-actions

This comment was marked as resolved.

Please sign in to comment.