Migrate things into new UI design

This commit is contained in:
James Babcock committed 2026-07-07 00:52:47 -07:00
1 parent 1133f952e9
commit 68ab599856
21 files changed
+1262 -602

No files matched your search

+8 -6
View File
@@ -1,16 +1,18 @@
import { getDefaultSmallFont } from "~/graphics/bdffont";
import { G2_LENS_HEIGHT, G2_LENS_WIDTH, GrayImage } from "~/graphics/image";
import { GrayImage } from "~/graphics/image";
import { getDashboardLogo } from "~/graphics/logo";
import { DashboardInputEvent, Layer, LayerStack } from "../layers";
import { DashboardInputEvent, Layer, LayerContext, LayerStack } from "../layers";
export class AboutPage implements Layer {
paint(): GrayImage {
const image = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0);
paint(ctx: LayerContext): GrayImage {
// Sized to the hosting stack (the Settings app viewport).
const { width, height } = ctx.stack.getBaseSize();
const image = new GrayImage(width, height, 0);
const logo = getDashboardLogo();
const dashboardFont = getDefaultSmallFont();
image.drawText(dashboardFont, 22, 16, "About Faceclaw", 220);
if (logo) {
image.bitBlt(logo, 22, 42);
image.bitBlt(logo, 22, 42, { transparentZero: true });
}
image.drawText(dashboardFont, 108, 48, "Faceclaw", 220);
image.drawText(dashboardFont, 108, 64, "Dashboard prototype", 180);
@@ -18,7 +20,7 @@ export class AboutPage implements Layer {
image.drawTextWrapped({
font: dashboardFont,
x: 22, y: 128,
width: G2_LENS_WIDTH - 44,
width: width - 44,
text: "By James Babcock. Distributed under the GNU General Public License, version 3. Version 0.1.0. Too much of an early janky development prototype to have proper numbered releases.",
value: 180
});