Skip to content

Commit

Permalink
Fix Default Terminal and Color Scheme ComboBoxes cropping at 200% Tex…
Browse files Browse the repository at this point in the history
…t Size (#15762)

When the OS' "text size" setting gets set to 200% and the display
resolution is reduced quite a bit, we get some cropped text in the SUI's
Default Terminal ComboBox. Turns out, we have a height set on the items.
I went ahead and removed that so we don't crop the text. Everything
looks good still!

A similar issue occurs in the Profile > Appearance > Color Scheme
ComboBox. I went ahead and fixed that too by removing the height
restriction.

Other minor changes:
- fixed the comments
- changed "author and version" row to "auto" instead of "*" (star sizing
is great for proportional sizing, so we're not really taking advantage
of it)

Closes #15149

(cherry picked from commit 1f9426b)
Service-Card-Id: 89991191
Service-Version: 1.18
  • Loading branch information
carlos-zamora authored and DHowett committed Jul 27, 2023
1 parent dec1974 commit d31f81a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/cascadia/TerminalSettingsEditor/Appearances.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="local:ColorSchemeViewModel">
<Grid Grid.Column="0"
Height="32"
Padding="8,8,0,0"
Padding="8"
VerticalAlignment="Center"
Background="{x:Bind local:Converters.ColorToBrush(BackgroundColor.Color), Mode=OneWay}"
ColumnSpacing="1"
Expand Down
17 changes: 7 additions & 10 deletions src/cascadia/TerminalSettingsEditor/Launch.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,18 @@

<Grid.ColumnDefinitions>
<!-- icon -->
<ColumnDefinition Width="24" />
<!-- profile name and author -->
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
<!-- terminal name and author -->
<ColumnDefinition Width="auto" />
<!-- version -->
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>

<Grid.RowDefinitions>
<!-- profile name -->
<RowDefinition Height="20" />
<!-- terminal name -->
<RowDefinition Height="auto" />
<!-- author and version -->
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>

<IconSourceElement Grid.Row="0"
Expand All @@ -109,21 +109,18 @@
<TextBlock Grid.Row="0"
Grid.Column="1"
Grid.ColumnSpan="2"
Height="20"
AutomationProperties.AccessibilityView="Raw"
Text="{x:Bind Name}" />

<TextBlock Grid.Row="1"
Grid.Column="1"
Height="20"
AutomationProperties.AccessibilityView="Raw"
Style="{ThemeResource SecondaryTextBlockStyle}"
Text="{x:Bind Author}"
Visibility="{x:Bind local:Converters.StringNotEmptyToVisibility(Author)}" />

<TextBlock Grid.Row="1"
Grid.Column="2"
Height="20"
AutomationProperties.AccessibilityView="Raw"
Style="{ThemeResource SecondaryTextBlockStyle}"
Text="{x:Bind Version}"
Expand Down

0 comments on commit d31f81a

Please sign in to comment.