unoplatform / uno.resizetizer

The home for Uno.Resizetizer, an image resizting tooling for Uno Platform apps
https://platform.uno
Other
16 stars 7 forks source link

feat: Allow disabling the icon background #310

Open MartinZikmund opened 3 months ago

MartinZikmund commented 3 months ago

Part of: https://github.com/unoplatform/uno.resizetizer/issues/190

PR Type

What kind of change does this PR introduce?

What is the current behavior?

Currently the user must create a new .svg file like icon_transparent.svg that is empty and provide it as the UnoIconBackgroundFile - as leaving this empty will fallback to icon.svg.

What is the new behavior?

New attribute allows setting UseIconBackground to false, which will not use the background file while generating, and will keep the foreground file only instead.

I made a follow up PR https://github.com/unoplatform/uno/pull/17855 in Uno.UI to add a prop to control this and then default this to false on WASM, desktop and WinUI, where users most commonly don't want a background behind the icon.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

MartinZikmund commented 3 months ago

TODO docs, waiting for approval that this approach makes sense

MartinZikmund commented 2 months ago

@jeromelaban can you confirm this approach works?

MartinZikmund commented 2 months ago

This approach is compatible with https://github.com/unoplatform/uno.resizetizer/issues/239