commit 944a3a2f393a21166846842b43771292349461b7
parent 3d1ef872c5ac7bcd559f3d0f38fdcc19388eacf7
Author: Divan Visagie <me@divanv.com>
Date: Sat, 28 Nov 2026 17:34:51 +0100
installer, greeter: screenshots for the README, and a flask GIF drawn from its frames without opening a window (make gif)
Diffstat:
16 files changed, 59 insertions(+), 1 deletion(-)
diff --git a/greeter/docs/screenshot-login-typing.png b/greeter/docs/screenshot-login-typing.png
Binary files differ.
diff --git a/greeter/docs/screenshot-login-wrong.png b/greeter/docs/screenshot-login-wrong.png
Binary files differ.
diff --git a/greeter/docs/screenshot-login.png b/greeter/docs/screenshot-login.png
Binary files differ.
diff --git a/greeter/docs/screenshot-setup-filled.png b/greeter/docs/screenshot-setup-filled.png
Binary files differ.
diff --git a/greeter/docs/screenshot-setup.png b/greeter/docs/screenshot-setup.png
Binary files differ.
diff --git a/installer/Cargo.lock b/installer/Cargo.lock
@@ -2425,6 +2425,7 @@ dependencies = [
"egui_extras",
"image",
"patina-ui",
+ "resvg",
"serde_json",
]
diff --git a/installer/Cargo.toml b/installer/Cargo.toml
@@ -15,3 +15,7 @@ patina-ui = "0.1"
serde_json = "1"
# Screenshots (`make screenshot`).
image = { version = "0.25", default-features = false, features = ["png"] }
+
+[dev-dependencies]
+# examples/flask_gif.rs rasterises the flask's frames for docs/flask.gif.
+resvg = { version = "0.45", default-features = false }
diff --git a/installer/Makefile b/installer/Makefile
@@ -2,7 +2,7 @@ APP_NAME := patina-installer
.DEFAULT_GOAL := help
-.PHONY: help run build test check screenshot clean
+.PHONY: help run build test check screenshot gif clean
help: ## Show this help
@echo "Usage: make <target>"
@@ -26,5 +26,10 @@ screenshot: ## Regenerate docs/screenshot-*.png from the mock (needs a desktop)
for s in choose confirm installing done failed; do \
PATINA_INSTALLER_MOCK=1 PATINA_INSTALLER_SIZE=1280x800 PATINA_INSTALLER_DEMO=$$s PATINA_INSTALLER_SCREENSHOT=docs/screenshot-$$s.png cargo run; done
+gif: ## Regenerate docs/flask.gif from the flask's frames (no window)
+ cargo run -q --example flask_gif -- target/flask-frames
+ ffmpeg -y -loglevel error -framerate 12 -pattern_type glob -i "target/flask-frames/f*.png" \
+ -vf "split[a][b];[a]palettegen[p];[b][p]paletteuse" -loop 0 docs/flask.gif
+
clean: ## Remove build output
cargo clean
diff --git a/installer/docs/flask.gif b/installer/docs/flask.gif
Binary files differ.
diff --git a/installer/docs/make-gif.sh b/installer/docs/make-gif.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Regenerates docs/flask.gif: the install screen's flask, one screenshot per frame of its loop.
+set -e
+cd "$(dirname "$0")/.."
+tmp=$(mktemp -d)
+cargo build -q
+i=0
+while [ $i -lt 72 ]; do
+ PATINA_INSTALLER_MOCK=1 PATINA_INSTALLER_SIZE=1280x800 PATINA_INSTALLER_DEMO=installing \
+ PATINA_INSTALLER_AT=$(awk "BEGIN{print $i/24}") PATINA_INSTALLER_SCREENSHOT=$tmp/f$(printf %03d $i).png \
+ ./target/debug/patina-installer >/dev/null 2>&1
+ i=$((i + 2))
+done
+ffmpeg -y -loglevel error -framerate 12 -pattern_type glob -i "$tmp/f*.png" \
+ -vf "crop=520:560:380:40,split[a][b];[a]palettegen=max_colors=64[p];[b][p]paletteuse" -loop 0 docs/flask.gif
+rm -rf "$tmp"
diff --git a/installer/docs/screenshot-choose.png b/installer/docs/screenshot-choose.png
Binary files differ.
diff --git a/installer/docs/screenshot-confirm.png b/installer/docs/screenshot-confirm.png
Binary files differ.
diff --git a/installer/docs/screenshot-done.png b/installer/docs/screenshot-done.png
Binary files differ.
diff --git a/installer/docs/screenshot-failed.png b/installer/docs/screenshot-failed.png
Binary files differ.
diff --git a/installer/docs/screenshot-installing.png b/installer/docs/screenshot-installing.png
Binary files differ.
diff --git a/installer/examples/flask_gif.rs b/installer/examples/flask_gif.rs
@@ -0,0 +1,32 @@
+//! Writes every other frame of the flask's loop as a PNG into the directory given, in the dark
+//! skin's colours, without opening a window: `make gif` stitches them into docs/flask.gif.
+
+use egui::Color32;
+
+#[path = "../src/flask.rs"]
+#[allow(dead_code)]
+mod flask;
+
+fn main() {
+ let dir = std::path::PathBuf::from(std::env::args().nth(1).expect("usage: flask_gif DIR"));
+ std::fs::create_dir_all(&dir).unwrap();
+ let (glass, liquid, bg) = (
+ Color32::from_rgb(0xD3, 0xC6, 0xAA),
+ Color32::from_rgb(0xA7, 0xC0, 0x80),
+ Color32::from_rgb(0x2D, 0x35, 0x3B),
+ );
+ for i in (0..flask::FRAMES).step_by(2) {
+ let svg = flask::frame_svg(i, glass, liquid, bg);
+ let tree = resvg::usvg::Tree::from_str(&svg, &resvg::usvg::Options::default()).unwrap();
+ let (w, h) = (350, 418);
+ let mut pixmap = resvg::tiny_skia::Pixmap::new(w, h).unwrap();
+ pixmap.fill(resvg::tiny_skia::Color::from_rgba8(bg.r(), bg.g(), bg.b(), 255));
+ let scale = w as f32 / tree.size().width();
+ resvg::render(
+ &tree,
+ resvg::tiny_skia::Transform::from_scale(scale, scale),
+ &mut pixmap.as_mut(),
+ );
+ pixmap.save_png(dir.join(format!("f{i:03}.png"))).unwrap();
+ }
+}