Skip to content

Commit

Permalink
PRE-MERGE #18424 [Windows 10] Fix layout in New Tab Menu page
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-zamora committed Jan 20, 2025
2 parents c15f4d4 + 199f0ca commit 6088d2b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/cascadia/TerminalSettingsEditor/NewTabMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,17 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!--
BODGY: We want two columns of content:
1. the identifier (e.g. profile name), aligned left
2. the buttons (e.g. reorder, delete), aligned right
There's a bug in WinUI 2 for Windows 10 where these nested columns are treated as "auto" instead
of *-sized. To work around this, we can set the width of the first column's content to
StandardControlMaxWidth. The first column will be clipped as necessary to make space for the second column,
resulting in the desired layout.
-->
<ContentPresenter Grid.Column="0"
Width="{StaticResource StandardControlMaxWidth}"
Content="{TemplateBinding Content}" />
<StackPanel Grid.Column="1"
Orientation="Horizontal"
Expand Down Expand Up @@ -127,7 +137,17 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!--
BODGY: We want two columns of content:
1. the identifier (e.g. profile name), aligned left
2. the buttons (e.g. reorder, delete), aligned right
There's a bug in WinUI 2 for Windows 10 where these nested columns are treated as "auto" instead
of *-sized. To work around this, we can set the width of the first column's content to
StandardControlMaxWidth. The first column will be clipped as necessary to make space for the second column,
resulting in the desired layout.
-->
<StackPanel Grid.Column="0"
Width="{StaticResource StandardControlMaxWidth}"
Orientation="Horizontal">
<IconSourceElement Width="16"
Height="16"
Expand Down

0 comments on commit 6088d2b

Please sign in to comment.