Add feedback components 106-130; inert scope, focus return, two-step deploy

This commit is contained in:
ZacharyZhang-NY committed 2026-10-11 20:58:30 -04:00
1 parent bce416182e
commit bd3877e1b1
87 files changed
+2492 -147

No files matched your search

+13
View File
@@ -22,6 +22,8 @@ type Settings struct {
Locale Locale
// Now replaces the frame clock, for tests.
Now func() time.Time
// Inert controls take no input, as under a busy veil.
Inert bool
}
// Kit is one frame's settings, captured by components.
@@ -131,3 +133,14 @@ func theme(p *Palette) *ui.Theme {
t.Selection, t.Focus, t.Scrollbar, t.Radius = c[AccentLit], c[Accent], ui.Transparent, 0
return t
}
// Or is v, or def for zero; negatives panic.
func Or(name string, v, def int) int {
if v < 0 {
panic(fmt.Sprintf("pixel: %s %d is negative", name, v))
}
if v == 0 {
return def
}
return v
}