mirror of https://github.com/ospab/ostp.git
fix(flutter): eagle watermark rendered as a flat gray square
assets/logo.png had NO real alpha transparency — both the background and the eagle shape were fully opaque (A=255 everywhere), just baked in as near-black (3,3,3) vs near-white (253,253,253) RGB. Applying `color: Colors.white` to tint it painted the WHOLE bounding square white (alpha being 255 across the entire image gives BlendMode nothing to mask against), which at low Opacity looked like a flat gray square instead of a silhouette. Converted the asset in place: since it was already grayscale (R=G=B), each pixel's luminance became its new alpha channel, RGB set to pure white. The background (near-black, low luminance) is now near-transparent; the eagle (near-white, high luminance) is now near-opaque. This is the same effect the desktop GUI gets for free from its logo.svg (a vector eagle path with no background element at all — inherently transparent), just reproduced for a raster asset without adding flutter_svg as a new dependency. The `color: Colors.white` tint in both watermark call sites is now redundant (the asset is already a pure-white silhouette) and removed.
This commit is contained in:
parent
eda2a0eba7
commit
7d9e5faeec
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 11 KiB |
|
|
@ -486,7 +486,9 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
child: Image.asset(
|
||||
'assets/logo.png',
|
||||
width: MediaQuery.of(context).size.shortestSide * 0.6,
|
||||
color: Colors.white,
|
||||
// No color tint needed — the asset now carries real alpha
|
||||
// (background pixels' luminance was baked into alpha, see
|
||||
// git history), so it's already a pure white silhouette.
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -564,7 +564,9 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||
child: Image.asset(
|
||||
'assets/logo.png',
|
||||
width: MediaQuery.of(context).size.shortestSide * 0.6,
|
||||
color: Colors.white,
|
||||
// No color tint needed — the asset now carries real alpha
|
||||
// (background pixels' luminance was baked into alpha, see
|
||||
// git history), so it's already a pure white silhouette.
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue