Give the Android app its launcher icon - #70
Merged
Merged
Conversation
The app showed the platform's default icon. It now has the site's: four bars at levels 1, 4, 7 and 10, the ten-cell mark reduced to its ramp. The same script that draws the favicon and the installable web icon writes it, from the same tokens and the same masked geometry, as an adaptive icon in vector layers, so CI's existing icon check covers it and the generated files are pinned to LF like the site's. With themed icons on, the monochrome layer carries the ramp in opacity, each bar as opaque as its tint is dark against the ground. The window behind the app while it starts, where Android 12 and later shows the icon, is now the page's own ground in either theme instead of the platform's light background, so a launch in dark mode no longer flashes light first. The script now reads the light ground from the tokens rather than a copy of it; the site's icons are byte for byte unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
design/build-icons.mjs, which already draws the favicon and the installable web icon, now also writes five Android files:mipmap-anydpi/ic_launcher.xml: the adaptive icon, with background, foreground and monochrome layersdrawable/launcher_bars.xml: the four bars in their tints, on the 108-unit adaptive canvas, placed by the web icon's masked geometry measured against the 72 units a launcher showsdrawable/launcher_bars_monochrome.xml: the themed-icon layer, where each bar's opacity is its ink against the ground in CIE lightness (1, 0.79, 0.50, 0.27), so the ramp survives one colourvalues/launcher.xmlandvalues-night/launcher.xml: the icon's fixed ground, and the starting window's ground for each themeTheme.Gpcpaints the window behind the app with the page's own ground in either theme. On Android 12 and later the icon is shown on that window while the app starts. It used the platform light theme's background, so a dark-mode launch flashed light before the first frame..gitattributes, like the site's, because--checkcompares bytes.Checks
node design/build-icons.mjs --check: 10 icons match. The site's five were unchanged before and after regenerating.launcher_bars.xmlfailed the check, naming the file. Restored.icon-512.png, from the same script, already is one.