This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8d674bb
to
245ed2a
Compare
I've added an implementation for macOS. There is some odd clipping happening (that was also happening before) that I haven't been able to fix. I've also changed the macOS implementation to support screen scaling. |
I've had issues getting Forms to compile on Windows, so I'm going to have to leave it at Android, iOS and macOS. The UWP implementation should be straightforward. |
fb51a94
to
6073f4d
Compare
Hey there @GalaxiaGuy, thank you so much for all your time and effort on this. It really is appreciated. For whatever reason this was left too long and now we're unable to still add this to Forms. If this is still something you'd love to see in .NET MAUI, please open a spec there so we can discuss and hopefully salvage this code and use it there. Again, thank you! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
a/fonticon
API-change
Heads-up to reviewers that this PR may contain an API change
ControlGallery
p/Android
p/iOS 🍎
p/macOS
potential-maui-material
t/enhancement ➕
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
The original FontIconSource spec (#3189) included a layered option. This is an implementation for iOS, Android and macOS.
My plan is to add the other platforms, but I wanted confirmation this was still likely to be accepted before continuing.API Changes
-->
None
Platforms Affected
Before/After Screenshots
Testing Procedure
Some layered icons have been added to the Font ImageSource gallery
Open questions
I've repurposed
FontImageSourceHandler
to handle layered and non-layered to share code easier. This does mean that the non-layered case allocates a List. Would it be better to keep them separate.I initially thought
FontFamily
andSize
were highly likely to be shared between layers, so adding them made sense.Color
seemed less likely, but possible.Glyph
seems unlikely, but allowing it to be shared wasn't any harder.Should
LayeredFontImageSource
inherit fromFontImageSource
? It doesn't really make sense conceptually and would imply you could have a layer of layers. On the other hand it would be handy fallback if platforms don't get a proper implementation.There currently isn't a reliable way to detect whetherFontImageSource.Size
has been set explicitly, or is the default. So if the user hasLayeredFontImageSource.Size
set to something other than 30, and then wants to override it with 30, that won't be handled correctly.I could possibly do UWP.On the subject of UWP, I'm not sure whatLoadIconSourceAsync
andLoadIconElementAsync
should do.PR Checklist