MCPcopy Create free account
hub / github.com/B33pBeeps/redthread / syncColor

Method syncColor

internal/app/menu.go:216–222  ·  view source on GitHub ↗

syncColor live-previews the fill as the cursor lands on a color/custom row; on the cork row the fill is left unchanged.

()

Source from the content-addressed store, hash-verified

214// syncColor live-previews the fill as the cursor lands on a color/custom row;
215// on the cork row the fill is left unchanged.
216func (m *BackgroundMenu) syncColor() {
217 if i := m.colorIndex(); i >= 0 {
218 m.Color = BackgroundColors[i].Hex
219 } else if m.OnCustom() {
220 m.Color = m.Hex
221 }
222}
223
224// ToggleCork flips the cork overlay (used by left/right/space on the cork row).
225func (m *BackgroundMenu) ToggleCork() { m.Cork = !m.Cork }

Callers 1

MoveMethod · 0.95

Calls 2

colorIndexMethod · 0.95
OnCustomMethod · 0.95

Tested by

no test coverage detected