--- background picker ------------------------------------------------- BackgroundMenu is the stateful background picker. nil on model = closed. Two independent axes: a cork on/off toggle (row 0) and the fill color (the BackgroundColors rows, then a custom-hex row). Row layout: 0
| 153 | // 1 .. len(colors) → color rows (color index = cursor-1) |
| 154 | // len(colors)+1 → custom hex |
| 155 | type BackgroundMenu struct { |
| 156 | Cursor int |
| 157 | Saved Background // background at open time; restored on esc |
| 158 | |
| 159 | Cork bool // working cork toggle |
| 160 | Color string // working fill color (hex, or "" for transparent) |
| 161 | Hex string // custom-hex buffer, e.g. "#1c2233" |
| 162 | } |
| 163 | |
| 164 | func NewBackgroundMenu(current Background) *BackgroundMenu { |
| 165 | m := &BackgroundMenu{ |
nothing calls this directly
no outgoing calls
no test coverage detected