Trim needless comments and fix the picker width

Remove comments that only restate the code, keeping the section banners
and the notes that carry a reason, a measured fact or an external
contract.

ButtonOptions.width claimed to be a fixed width but only set minWidth,
so the Graph and Texture pickers grew with the name they showed. It is
now what it promises, with a separate minWidth for the buttons that have
two forms. Narrow buttons shrink their padding, otherwise a 24px icon
button had 8px left for its glyph and truncate dropped it entirely.

__gm.labelsDropped() guards that class: the overflow guard only saw text
that was too wide, never a label truncated to nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5 committed 2026-09-08 15:52:05 +02:00
1 parent f16801aef3
commit 4d84231b9f
115 files changed
+707 -1564

No files matched your search

+1 -12
View File
@@ -1,8 +1,4 @@
/**
* Design tokens for the canvas UI. Widgets take every color and text style from here and
* the sizes they share (row/control heights, spacing, the few named control sizes); sizes
* that only one widget uses may stay local to it.
*/
/** Design tokens for the canvas UI. Sizes only one widget uses may stay local to it. */
import { TextStyle } from 'pixi.js';
export const Theme = {
@@ -15,13 +11,9 @@ export const Theme = {
padding: 8,
gap: 6,
radius: 4,
/** Horizontal inset of text inside text fields. */
fieldPadding: 6,
/** Side length of the checkbox square (centred inside the control height). */
checkboxSize: 16,
/** Side length of the small color marker in list rows. */
swatchSize: 12,
/** Width of the scrollbar thumb. */
scrollbarWidth: 6,
/** Horizontal indent per nesting level in tree lists. */
treeIndent: 14,
@@ -46,9 +38,7 @@ export const Theme = {
/** Collider outlines: solid (blocking) and trigger (events only). */
collider: 0x4fd18b,
trigger: 0xf2c84b,
/** Container (group) symbols. */
container: 0x3fb8c9,
/** Rubber-band selection rectangle. */
marquee: 0x4c8dff,
/** Node graph: canvas, node chrome, per-category title colors, port colors, live highlight. */
graphBackground: 0x15171b,
@@ -72,7 +62,6 @@ export const Theme = {
const styleCache = new Map<string, TextStyle>();
/** Named text styles; every piece of text in the UI uses one of these. */
export type TextStyleToken = 'body' | 'bodyBold' | 'muted' | 'small' | 'title' | 'mono' | 'accent';
/** Shared TextStyle instances so Pixi can cache glyph measurements per token. */