Skip to content

Commit

Permalink
fix: adjust font families to use semantic resources (#1090)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazo0 authored Apr 3, 2024
1 parent 476437c commit 6e6cb49
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions doc/controls/Divider.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ A divider is a thin line that groups content in lists and layouts.

## Lightweight Styling

| Key | Type | Value |
|----------------------------------|------------------|---------------------------|
| Key | Type | Value |
|------------------------------------|--------------------|-----------------------------|
| `DividerForeground` | `SolidColorBrush` | `OutlineVariantBrush` |
| `DividerSubHeaderForeground` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `DividerSubHeaderFontFamily` | `FontFamily` | `MaterialMediumFontFamily` |
| `DividerSubHeaderFontFamily` | `FontFamily` | `BodySmallFontFamily` |
| `DividerSubHeaderFontWeight` | `FontWeight` | `BodySmallFontWeight` |
| `DividerSubHeaderFontSize` | `FontSize` | `BodySmallFontSize` |
| `DividerSubHeaderCharacterSpacing` | `CharacterSpacing` | `BodySmallCharacterSpacing` |
Expand Down
2 changes: 1 addition & 1 deletion doc/controls/NavigationBar.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ Only supports `BitmapImage` on iOS/Android
| `NavigationBarForeground` | `SolidColorBrush` | OnSurfaceBrush |
| `NavigationBarBackground` | `SolidColorBrush` | SurfaceBrush |
| `NavigationBarPadding` | `Thickness` | 4,0,0,0 |
| `NavigationBarFontFamily` | `FontFamily` | MaterialRegularFontFamily |
| `NavigationBarFontFamily` | `FontFamily` | TitleLargeFontFamily |
| `NavigationBarFontWeight` | `String` | TitleLargeFontWeight |
| `NavigationBarFontSize` | `Double` | TitleLargeFontSize |
| `MaterialModalNavigationBarMainCommandForeground` | `SolidColorBrush` | OnSurfaceBrush |
Expand Down
2 changes: 1 addition & 1 deletion doc/material-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Existing explicit references to `-DisabledLow` resources have been updated to us

### Markup Theme class name

The `Theme` class in the `Uno.Toolkit.UI.Markup` has been renamed to `ToolkitTheme` in order to no longer clash with the `Theme` class from `Uno.Themes.Markup`.
The `Theme` class in the `Uno.Toolkit.UI.Markup` has been renamed to `ToolkitTheme` in order to no longer clash with the `Theme` class from `Uno.Themes.Markup`.

This affects all references to the `Theme` class in the `Uno.Toolkit.UI.Markup` namespace, which are outlined in the table below:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}"
FontFamily="{ThemeResource MaterialMediumFontFamily}"
FontFamily="{ThemeResource LabelLargeFontFamily}"
Foreground="{TemplateBinding Foreground}" />

<!-- C2: Remove Button -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<StaticResource x:Key="DividerForeground" ResourceKey="OutlineVariantBrush" />
<StaticResource x:Key="DividerSubHeaderForeground" ResourceKey="OnSurfaceLowBrush" />

<StaticResource x:Key="DividerSubHeaderFontFamily" ResourceKey="MaterialMediumFontFamily" />
<StaticResource x:Key="DividerSubHeaderFontFamily" ResourceKey="BodySmallFontFamily" />
<StaticResource x:Key="DividerSubHeaderFontWeight" ResourceKey="BodySmallFontWeight" />
<StaticResource x:Key="DividerSubHeaderFontSize" ResourceKey="BodySmallFontSize" />
<StaticResource x:Key="DividerSubHeaderCharacterSpacing" ResourceKey="BodySmallCharacterSpacing" />
Expand All @@ -20,7 +20,7 @@
<StaticResource x:Key="DividerForeground" ResourceKey="OutlineVariantBrush" />
<StaticResource x:Key="DividerSubHeaderForeground" ResourceKey="OnSurfaceLowBrush" />

<StaticResource x:Key="DividerSubHeaderFontFamily" ResourceKey="MaterialMediumFontFamily" />
<StaticResource x:Key="DividerSubHeaderFontFamily" ResourceKey="BodySmallFontFamily" />
<StaticResource x:Key="DividerSubHeaderFontWeight" ResourceKey="BodySmallFontWeight" />
<StaticResource x:Key="DividerSubHeaderFontSize" ResourceKey="BodySmallFontSize" />
<StaticResource x:Key="DividerSubHeaderCharacterSpacing" ResourceKey="BodySmallCharacterSpacing" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<StaticResource x:Key="NavigationBarForeground" ResourceKey="OnSurfaceBrush" />
<StaticResource x:Key="NavigationBarBackground" ResourceKey="SurfaceBrush" />
<Thickness x:Key="NavigationBarPadding">4,0,0,0</Thickness>
<StaticResource x:Key="NavigationBarFontFamily" ResourceKey="MaterialRegularFontFamily" />
<StaticResource x:Key="NavigationBarFontFamily" ResourceKey="TitleLargeFontFamily" />
<StaticResource x:Key="NavigationBarFontWeight" ResourceKey="TitleLargeFontWeight" />
<StaticResource x:Key="NavigationBarFontSize" ResourceKey="TitleLargeFontSize" />

Expand Down Expand Up @@ -93,7 +93,7 @@
<StaticResource x:Key="NavigationBarForeground" ResourceKey="OnSurfaceBrush" />
<StaticResource x:Key="NavigationBarBackground" ResourceKey="SurfaceBrush" />
<Thickness x:Key="NavigationBarPadding">4,0,0,0</Thickness>
<StaticResource x:Key="NavigationBarFontFamily" ResourceKey="MaterialRegularFontFamily" />
<StaticResource x:Key="NavigationBarFontFamily" ResourceKey="TitleLargeFontFamily" />
<StaticResource x:Key="NavigationBarFontWeight" ResourceKey="TitleLargeFontWeight" />
<StaticResource x:Key="NavigationBarFontSize" ResourceKey="TitleLargeFontSize" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@
- BottomTabBar (known as NavigationBar in Material Design 3: https://m3.material.io/components/navigation-bar/overview)
-->
<Style x:Key="MaterialBaseNavigationTabBarItemStyle" TargetType="utu:TabBarItem">
<Setter Property="FontFamily" Value="{ThemeResource MaterialMediumFontFamily}" />
<Setter Property="FontFamily" Value="{ThemeResource LabelMediumFontFamily}" />
<Setter Property="FontSize" Value="{ThemeResource LabelMediumFontSize}" />
<Setter Property="FontWeight" Value="{ThemeResource LabelMediumFontWeight}" />
<Setter Property="UseSystemFocusVisuals" Value="True" />
Expand Down Expand Up @@ -1170,7 +1170,7 @@

<!--#region FAB TabBarItem Styles-->
<Style x:Key="MaterialBaseFabTabBarItemStyle" TargetType="utu:TabBarItem">
<Setter Property="FontFamily" Value="{ThemeResource MaterialMediumFontFamily}" />
<Setter Property="FontFamily" Value="{ThemeResource LabelMediumFontFamily}" />
<Setter Property="FontSize" Value="{ThemeResource LabelMediumFontSize}" />
<Setter Property="FontWeight" Value="{ThemeResource LabelMediumFontWeight}" />
<Setter Property="IsSelectable" Value="False" />
Expand Down

0 comments on commit 6e6cb49

Please sign in to comment.