Skip to content

Commit

Permalink
fix(NavigationView): Content top padding is not correct
Browse files Browse the repository at this point in the history
- Fixes issue unoplatform#4793 where Content top padding was not correctly applied due to the fact that API information reported API availability matching SDK 17134, while Uno supports 19041
- Updates TabView FluentStyles style to be buildable with new contract support, because {Binding} is not supported in Style Setters yet (unoplatform#4826)
  • Loading branch information
MartinZikmund committed Jan 5, 2021
1 parent 69318b4 commit 78fdd7f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Uno.Foundation/Metadata/ApiInformation.shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public static bool IsApiContractPresent(string contractName, ushort majorVersion
switch (contractName)
{
case "Windows.Foundation.UniversalApiContract":
// See https://docs.microsoft.com/en-us/uwp/extension-sdks/windows-universal-sdk
return majorVersion <= 6; // SDK 10.0.17134.1
// See C:\Program Files (x86)\Windows Kits\10\References\[version]\Windows.Foundation.UniversalApiContract
return majorVersion <= 10; // SDK 10.0.19041.1

case "Uno.WinUI":
#if HAS_UNO_WINUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@
<Style x:Name="TabViewButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{ThemeResource TabViewButtonBackground}"/>
<Setter Property="Foreground" Value="{ThemeResource TabViewButtonForeground}"/>
<contract7Present:Setter Property="CornerRadius" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource TopCornerRadiusFilterConverter}}"/>
<contract7Present:Setter Property="CornerRadius" Value="4,4,0,0" />
<!--TODO: Uno enable when #4826 is fixed ="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource TopCornerRadiusFilterConverter}}"/>-->
<Setter Property="FontSize" Value="11"/>
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
Expand Down
3 changes: 2 additions & 1 deletion src/Uno.UI.FluentTheme/themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20177,7 +20177,8 @@
<Style x:Name="TabViewButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{ThemeResource TabViewButtonBackground}" />
<Setter Property="Foreground" Value="{ThemeResource TabViewButtonForeground}" />
<contract7Present:Setter Property="CornerRadius" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource TopCornerRadiusFilterConverter}}" />
<contract7Present:Setter Property="CornerRadius" Value="4,4,0,0" />
<!--TODO: Uno enable when #4826 is fixed ="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource TopCornerRadiusFilterConverter}}"/>-->
<Setter Property="FontSize" Value="11" />
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
<Setter Property="VerticalAlignment" Value="Bottom" />
Expand Down
4 changes: 2 additions & 2 deletions src/Uno.UI/Microsoft/UI/Xaml/Controls/TabView/TabView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@
<Setter Property="Background" Value="{ThemeResource TabViewButtonBackground}"/>
<Setter Property="Foreground" Value="{ThemeResource TabViewButtonForeground}"/>
<Setter Property="CornerRadius" Value="4,4,0,0" />
<!--TODO: ="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource TopCornerRadiusFilterConverter}}"/>-->
<Setter Property="FontSize" Value="11"/>
<!--TODO: Uno enable when #4826 is fixed ="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource TopCornerRadiusFilterConverter}}"/>-->
<Setter Property="FontSize" Value="11"/>
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="Margin" Value="0,7,0,0"/>
Expand Down

0 comments on commit 78fdd7f

Please sign in to comment.