syncColor live-previews the fill as the cursor lands on a color/custom row; on the cork row the fill is left unchanged.
()
| 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. |
| 216 | func (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). |
| 225 | func (m *BackgroundMenu) ToggleCork() { m.Cork = !m.Cork } |
no test coverage detected