Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

prakashKannanSf3972
Copy link
Contributor

@prakashKannanSf3972 prakashKannanSf3972 commented Feb 5, 2025

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 to Automatic, allowing the rendering behavior to be determined based on the UI context. When a custom FlyoutIcon 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.

  • When no custom FlyoutIcon is set, its color can still be modified using Shell.ForegroundColor.
  • When a custom FlyoutIcon is applied, it now preserves its original image color without automatic tinting.
  • If color customization for the custom icon is needed, 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

  • Android
  • Windows
  • iOS
  • Mac

Output

Before After

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Feb 5, 2025
Copy link
Contributor

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.

@jsuarezruiz jsuarezruiz added the area-controls-shell Shell Navigation, Routes, Tabs, Flyout label Feb 6, 2025
@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Feb 7, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@prakashKannanSf3972 prakashKannanSf3972 marked this pull request as ready for review February 11, 2025 14:59
@Copilot Copilot bot review requested due to automatic review settings February 11, 2025 14:59
@prakashKannanSf3972 prakashKannanSf3972 requested a review from a team as a code owner February 11, 2025 14:59

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.

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).


[Test]
[Category(UITestCategories.Shell)]
public void EnsureCustomFlyoutIconColor()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending macOS snapshot. Already available in the latest build:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsuarezruiz,

Thank you for highlighting this! The Pending Snapshot has been added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change the flyout icon color
3 participants