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

Make it possible to generate favicon without padding and without background #190

Open
6 tasks
MartinZikmund opened this issue Nov 1, 2023 · 7 comments
Open
6 tasks
Labels
kind/enhancement New feature or request. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@MartinZikmund
Copy link
Member

What would you like to be added:

Currently the background of the favicon is a solid color:

image

Why is this needed:

Make the icons nicer and more aligned with other websites

For which Platform:

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renders for Xamarin.Forms
  • Windows
  • Build tasks

Anything else we need to know?

@MartinZikmund MartinZikmund added kind/enhancement New feature or request. triage/untriaged Indicates an issue requires triaging or verification. labels Nov 1, 2023
@nickrandolph
Copy link
Contributor

@MartinZikmund is this on Windows?

@nickrandolph nickrandolph added triage/needs-information Indicates an issue needs more information in order to work on it. and removed triage/untriaged Indicates an issue requires triaging or verification. labels Nov 9, 2023
@MartinZikmund
Copy link
Member Author

MartinZikmund commented Nov 10, 2023

Yes seen it in our sample app in Edge on Windows, but it seems that the solid background is just part of the favicon itself

@MartinZikmund MartinZikmund added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed triage/needs-information Indicates an issue needs more information in order to work on it. labels Feb 21, 2024
@morning4coffe-dev
Copy link
Member

The same should be for the WinUI project also, I think. When I was generating the icon, I needed to manually go to manifest and update it myself with the asset without padding and background.

@dansiegel
Copy link
Contributor

@MartinZikmund the scaling is defined in the definition of the base.props.

https://github.com/unoplatform/uno.templates/blob/c88e0314f56cca5051abea7d7c93d713441ec5c3/src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Shared/base.props#L21

I would assume if you updated this to something like the following you might achieve the result you're looking for:

<PropertyGroup>
  <UnoIconScale>0.65</UnoIconScale>
  <UnoIconScale Condition="$(MSBuildProjectName.EndsWith('.Wasm')) or $(TargetFramework.Contains('-windows10'))">1.0</UnoIconScale>
</PropertyGroup>
<ItemGroup>
  <UnoIcon Include="$(MSBuildThisFileDirectory)Icons\icon.svg"
        ForegroundFile="$(MSBuildThisFileDirectory)Icons\icon_foreground.svg"
        ForegroundScale="$(UnoIconScale)"
        Color="#00000000" />
</ItemGroup>

@MartinZikmund
Copy link
Member Author

Will try this out

@MartinZikmund
Copy link
Member Author

MartinZikmund commented Apr 15, 2024

When I set the color as "#00000000" in UnoIcon, the icon.svg takes over and makes it solid color anyway. I had to make the icon.svg just <svg></svg> to make it work, but it feels weird...

Ideally, we should make the background transparent by default in the template as on most targets 95% users will want exactly that

@MartinZikmund
Copy link
Member Author

Also, how does one configure icon and splash screen in single project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

4 participants