Skip to content

Commit

Permalink
Remove a 1px gap under the tabs only visible at >150% (#15164)
Browse files Browse the repository at this point in the history
Set the padding to the default TabViewHeaderPadding (8,0,0,0), but with
-1 on the bottom. This prevents a small 1px gap that can appear on 150%
scale displays between the tab item and the content. The 1 on top helps
keep
the tab the correct relative height within the tab row.


Regressed in #15078 

See also MSFT:40692364
  • Loading branch information
zadjii-msft authored Apr 20, 2023
1 parent ffda8c4 commit 2aefb30
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/cascadia/TerminalApp/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

<!-- Suppress top padding -->
<Thickness x:Key="TabViewHeaderPadding">9,0,5,0</Thickness>

<Thickness x:Key="TabViewItemBorderThickness">1,1,1,0</Thickness>

<!--
Expand Down
4 changes: 2 additions & 2 deletions src/cascadia/TerminalApp/MinMaxCloseControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@
details.
-->
<x:Double x:Key="CaptionButtonHeightWindowed">40.0</x:Double>
<!-- 32 + 1 to compensate for GH#10746 -->
<x:Double x:Key="CaptionButtonHeightMaximized">33.0</x:Double>
<!-- 32 + (1 to compensate for GH#10746) + (-1 for GH#15164) -->
<x:Double x:Key="CaptionButtonHeightMaximized">32.0</x:Double>

<Style x:Key="CaptionButton"
TargetType="Button">
Expand Down
13 changes: 12 additions & 1 deletion src/cascadia/TerminalApp/TabRowControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,20 @@
Background="{ThemeResource TabViewBackground}"
mc:Ignorable="d">

<!-- GH#13143: Make sure that the Background is actually TabViewBackground here, not Transparent. This is load bearing, for showTabsInTitlebar=false. -->
<!--
GH#13143: Make sure that the Background is actually TabViewBackground
here, not Transparent. This is load bearing, for showTabsInTitlebar=false.
-->

<!--
Set the padding to -1 on the bottom. This prevents a small 1px gap that
can appear on 150% scale displays between the tab item and the content.
The 1 on top helps keep the tab the correct relative height within the
tab row.
-->

<mux:TabView x:Name="TabView"
Padding="0,1,0,-1"
VerticalAlignment="Bottom"
HorizontalContentAlignment="Stretch"
AllowDropTabs="True"
Expand Down

0 comments on commit 2aefb30

Please sign in to comment.