Add icon generation script and list scroll helper

Introduce gen_icons.sh to regenerate UI icons from a manifest file using the FreeInk SDK's Lucide icon set. Add icons.manifest mapping UI icons to Lucide names. Refactor vertical swipe list scrolling into a reusable wasListScroll() helper method used by both reader chapter selection and settings activities. Add static assertion to ensure ThemeMetrics scaling stays in sync with struct changes.
This commit is contained in:
Justin Mitchell
2026-06-16 00:15:18 -04:00
parent 1c63847631
commit 4a17d21d80
7 changed files with 86 additions and 37 deletions
+7
View File
@@ -25,6 +25,13 @@ int sp(int v, float s) { return static_cast<int>(std::lround(v * s)); }
} // namespace
ThemeMetrics scaleThemeMetrics(const ThemeMetrics& b, float s) {
// Every pixel field is scaled explicitly below. Counts, percents, ratios, bools,
// and the intentionally-unscaled chrome (homeCover*, statusBar*, progressBar*) are
// NOT touched. This guard fails when a ThemeMetrics field is added or removed —
// classify the new field (scale it, or leave it and note it here) and bump the
// expected size, so scaling can never silently miss a field.
static_assert(sizeof(ThemeMetrics) == THEME_METRICS_SIZEOF,
"ThemeMetrics changed: review scaleThemeMetrics() and update THEME_METRICS_SIZEOF");
ThemeMetrics m = b;
if (s == 1.0f) return m;
m.batteryWidth = sp(b.batteryWidth, s);