Limited
2
0

fix(ci): load cup logo from embedded resource instead of maui asset
All checks were successful
Release / Verify Apple Build (push) Successful in 12s
Release / Build & Pack (push) Successful in 8h59m32s
Release / Publish (push) Successful in 15s

Replace MAUI asset pipeline logo loading with embedded resource stream to fix logo not appearing in consuming NuGet projects. Add CustomLogoSource property to Button and Widget controls for custom branding. Update logo to higher resolution PNG. Bump version to 1.1.2.
This commit is contained in:
2026-03-04 02:37:46 -05:00
parent be1fad6083
commit a719eb7975
7 changed files with 148 additions and 13 deletions

View File

@@ -1,22 +1,21 @@
using System.Reflection;
namespace BuyMeCofee.Maui.Helpers;
internal static class BmcBrandAssets
{
// MAUI converts bmc_logo.svg → bmc_logo.png at build time with proper DPI scaling
private const string LogoFileName = "bmc_logo.png";
// Fallback: embedded PNG for QR code overlay (SkiaSharp needs a raw stream)
// Embedded PNG resource name — travels with the NuGet package assembly
private const string EmbeddedLogoName = "BuyMeCofee.Maui.Resources.Images.bmc_logo.png";
/// <summary>
/// Returns the cup logo as an ImageSource for MAUI Image controls.
/// Uses the MAUI asset pipeline (SVG → crisp multi-DPI PNG).
/// Loads from embedded PNG resource so it works in consuming NuGet projects.
/// </summary>
internal static ImageSource GetCupLogo()
{
return ImageSource.FromFile(LogoFileName);
return ImageSource.FromStream(() =>
{
var assembly = typeof(BmcBrandAssets).Assembly;
return assembly.GetManifestResourceStream(EmbeddedLogoName)!;
});
}
/// <summary>