Module 06 Β· The PawWalk Design System β Lesson 4 of 4 Β· ~11 min
Icons & Polish
No icon library β just a Canvas
Most apps pull in an icon font or a big vector-icon dependency. PawWalk doesn't: ui/components/HudIcons.kt draws every icon by hand with Compose's Canvas, at whatever size is asked for, in one consistent thin-line style. Cheaper to ship, and every icon matches exactly.
Canvas(modifier) gives you a drawing surface and a DrawScope β inside its lambda you call primitives like drawCircle, drawLine, drawPath, drawOval, each taking real pixel coordinates. To make an icon resize cleanly, every coordinate is written as a fraction of the icon's own size, never a hardcoded pixel number.