Skip to content

fix(maui): set ForegroundScale=0.55 on MauiIcon to resolve Android adaptive icon truncation (fixes #167) - #175

Merged
fboucher merged 1 commit into
mainfrom
fix/167-resizetizer-foreground-scale
Aug 7, 2026
Merged

fix(maui): set ForegroundScale=0.55 on MauiIcon to resolve Android adaptive icon truncation (fixes #167)#175
fboucher merged 1 commit into
mainfrom
fix/167-resizetizer-foreground-scale

Conversation

@fboucher

@fboucher fboucher commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary of Changes

  • Android Adaptive Icon Safe-Zone Fix: Added ForegroundScale="0.55" to the <MauiIcon> definition in src/NoteBookmark.MauiApp/NoteBookmark.MauiApp.csproj.
  • Root Cause & Technical Details:
    • MAUI Resizetizer automatically crops SVG foreground files to their non-transparent bounding box and stretches/scales the artwork to fill 100% of the 108dp foreground layer (432x432). Therefore, any transform matrix or transparent margins inside appiconfg.svg alone are stripped by Resizetizer during build time.
    • Setting ForegroundScale="0.55" instructs Resizetizer to scale the foreground artwork layer down to 55% of the canvas (59.4dp), ensuring 100% of the artwork sits comfortably inside Android's 66dp inner safe-zone circle on all Android devices/launchers.
    • Empirical Check on Compiled PNG: Max pixel distance from center reduced from 237.50px (out of safe zone) to 101.51px (strictly inside 132.00px safe-zone circle radius with a ~23% margin).

Fixes #167

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Health
NoteBookmark.AIServices 97% 64%
NoteBookmark.Api 89% 79%
NoteBookmark.BlazorApp 5% 10%
NoteBookmark.Domain 86% 75%
NoteBookmark.ServiceDefaults 96% 75%
NoteBookmark.SharedUI 15% 20%
Summary 53% (925 / 1740) 44% (238 / 541)

@fboucher
fboucher merged commit f2e66a5 into main Aug 7, 2026
1 check passed
@fboucher
fboucher deleted the fix/167-resizetizer-foreground-scale branch August 7, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The App icon on Android is cropped

2 participants