Skip to content

Commit

Permalink
Merge pull request #740 from scheidtdav/develop
Browse files Browse the repository at this point in the history
Update MaterialSymbols and include Filled variant in docs
  • Loading branch information
enisn authored Aug 20, 2024
2 parents d549aa0 + e0915f1 commit 101ae50
Show file tree
Hide file tree
Showing 8 changed files with 524 additions and 27 deletions.
11 changes: 8 additions & 3 deletions docs/en/theming/Icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,14 @@ builder
```

#### Font Names
3 font names are provided by Material Symbols. They can be used as `FontFamily` parameter in `FontImageSource`.
6 font names are provided by Material Symbols. They can be used as `FontFamily` parameter in `FontImageSource`.

- `MaterialOutlined`
- `MaterialOutlinedFilled`
- `MaterialRound`
- `MaterialRoundFilled`
- `MaterialSharp`
- `MaterialSharpFilled`

#### Glyphs
Glyphs are provided with `MaterialOutlined`, `MaterialRound` and `MaterialSharp` classes. They can be accessed like `MaterialSharp.Account_circle`. This class icluded in `UraniumUI` namespace. You should include following xml namespace to use it.
Expand All @@ -84,15 +87,17 @@ MAUI support font icons by using `FontImageSource` class. You can use it in `Ima
```xml
<Image>
<Image.Source>
<!-- Use FontFamily="MaterialSharpFilled" to get the filled variant of the selected glyph -->
<FontImageSource FontFamily="MaterialSharp" Glyph="{x:Static m:MaterialSharp.Warning}" Color="Red" />
</Image.Source>
</Image>
```

#### Migrating from MaterialIcons
With UraniumUI 2.8.0 the MaterialIcons became deprecated, since Google is recommending to switch over to MaterialSymbols instead.
The "filled" (MaterialRegular) and two-tone (MaterialTwoTone) styles are not available in MaterialSymbols and you will have to choose between "Outlined", "Rounded" and "Sharp".
You can compare the looks on [Google Fonts](https://fonts.google.com/icons?icon.set=Material+Symbols).
The two-tone (MaterialTwoTone) style is not available in MaterialSymbols.
You will have to choose between "Outlined", "Rounded" and "Sharp".
Looks can be compared on [Google Fonts](https://fonts.google.com/icons?icon.set=Material+Symbols).

Once a style is chosen, remove the MaterialIcons nuget package and install MaterialSymbols.
Make sure to follow the instructions above on how to setup the MaterialSymbols package.
Expand Down
540 changes: 516 additions & 24 deletions src/UraniumUI.Icons.MaterialSymbols/MaterialSymbols.cs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 101ae50

Please sign in to comment.