-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] - Fix Custom FlyoutIcon from Being Overridden to Default Color in Shell #27580
base: main
Are you sure you want to change the base?
Conversation
Hey there @prakashKannanSf3972! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
|
||
[Test] | ||
[Category(UITestCategories.Shell)] | ||
public void EnsureCustomFlyoutIconColor() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for highlighting this! The Pending Snapshot has been added.
Issue: The color of the custom FlyoutIcon in Shell resets to the default blue instead of retaining its original color.
RootCause
By default,
UIImageRenderingMode
is set toAutomatic
, allowing the rendering behavior to be determined based on the UI context. When a customFlyoutIcon
is applied, it does not retain its original color but instead adapts to the predefined tinting behavior, leading to unintended color changes.Description of Change
The image rendering mode is now set to
UIImageRenderingMode.AlwaysOriginal
, ensuring that custom icons maintain their original colors without being altered by default rendering behavior.FlyoutIcon
is set, its color can still be modified usingShell.ForegroundColor
.FlyoutIcon
is applied, it now preserves its original image color without automatic tinting.Shell.ForegroundColor
should be set accordingly to allow the color modification to be applied.Issues Fixed
Fixes #6738
Tested the behaviour in the following platforms
Output