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

MauiIcon ForegroundScale not working in incremental builds #22052

Open
abbemu opened this issue Apr 25, 2024 · 8 comments
Open

MauiIcon ForegroundScale not working in incremental builds #22052

abbemu opened this issue Apr 25, 2024 · 8 comments
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer i/regression This issue described a confirmed regression on a currently supported version platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@abbemu
Copy link

abbemu commented Apr 25, 2024

Description

Issue Description:
After upgrading from .NET 7 to .NET 8, the ForegroundScale property in MauiIcon is no longer functioning as expected. This property previously allowed developers to adjust the zoom level of the foreground image in the app icon, but it seems to be ignored in the latest version.

Expected Behavior:
Setting the ForegroundScale property in MauiIcon should alter the zoom of the foreground image in the app icon. For example, a ForegroundScale value of 0.50 should zoom out the image to 50% of its original size.

Current Behavior:
Regardless of the value set for ForegroundScale, the size of the foreground image remains unchanged.

.csproj file (default fresh test project):

Image looks identical no matter what value I enter in the ForegroundScale.
439388530_1153233509351933_4263392722408245301_n

Any help would be appreciated

Versions:
.NET: Microsoft.NETCore.App 8.0.2
Visual studio for Mac 17.6.9 (build 415).

Test devices:
Samsung Galaxy S22 API 33

Steps to Reproduce

Steps to Reproduce:
Upgrade a MAUI project from .NET 7 to .NET 8.
In the MauiIcon configuration, set the ForegroundScale to a value different from 1 (e.g., 0.50).
Build and run the application on Android.
Observe that the foreground image size does not reflect the specified ForegroundScale value.

Link to public reproduction project repository

No response

Version with bug

8.0.20 SR4

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@abbemu abbemu added the t/bug Something isn't working label Apr 25, 2024
@jfversluis jfversluis added area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer platform/android 🤖 potential-regression This issue described a possible regression on a currently supported version., verification pending labels Apr 25, 2024
@jaosnz-rep
Copy link

Verified on .NET 7.0 MAUI (7.0.101), it works fine.
Make sure this error only occurs in .NET 8.0 MAUI, verified versions: 8.0.21 and 8.0.0-rc.1.9171

@jaosnz-rep jaosnz-rep added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed i/regression This issue described a confirmed regression on a currently supported version and removed potential-regression This issue described a possible regression on a currently supported version., verification pending labels Apr 28, 2024
@abbemu
Copy link
Author

abbemu commented May 3, 2024

Any updates on this? @jfversluis

@ProfMStoica
Copy link

I am experiencing the same issue with .NET8.

@mattleibow
Copy link
Member

I had a quick look, and resizetizer is actually working - just our targets are not correctly marking things as updated. I see the inputs file that we create is correct, but then nothing happens. I think the checks are just looking to see if there is an output file for the input file - not if any of the additional properties have changed.

As a workaround for now, just delete the obj folder or rebuild when changing the MauiIcon properties - like color and scale.

@mattleibow mattleibow changed the title [Android] ForegroundScale property in MauiIcon not working in .NET 8 MauiIcon ForegroundScale not working in incremental builds Jul 1, 2024
@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
@samhouts samhouts added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 10, 2024
@wildwind2000
Copy link

I also encountered the same problem. When I created the program, I manually deleted the obj directory, but the resulting application icon still did not shrink.

@abbemu
Copy link
Author

abbemu commented Sep 6, 2024

@mattleibow Yes have already attempted this it doesn't work. Would be nice with a fix for this as publishing Android apps on the store with a icon looking like seems unprofessional.

@abbemu
Copy link
Author

abbemu commented Sep 19, 2024

bump

@edgarssults
Copy link

Clean and rebuild worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer i/regression This issue described a confirmed regression on a currently supported version platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants