Remove a 1px gap under the tabs only visible at >150% (#15164)

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
This commit is contained in:
Mike Griese
2023-04-20 12:13:40 -05:00
committed by GitHub
parent ffda8c4a95
commit 2aefb30355
3 changed files with 15 additions and 3 deletions

View File

@@ -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>
<!--

View File

@@ -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">

View File

@@ -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"