MCPcopy Create free account
hub / github.com/docker/docker-agent / leanCheckboxAt

Method leanCheckboxAt

cmd/root/agent_picker.go:629–638  ·  view source on GitHub ↗

leanCheckboxAt reports whether terminal coordinates land on the "Lean Mode" checkbox row. It mirrors the layout produced by render: the checkbox sits one blank row below the last card, at the cards' left offset.

(x, y int)

Source from the content-addressed store, hash-verified

627// Mode" checkbox row. It mirrors the layout produced by render: the checkbox
628// sits one blank row below the last card, at the cards' left offset.
629func (m *agentPickerModel) leanCheckboxAt(x, y int) bool {
630 originX, originY := m.panelOrigin()
631
632 checkboxY := originY + agentPickerCardsTop + m.cardRows() + 1
633 if y != checkboxY {
634 return false
635 }
636 relX := x - originX - agentPickerCardsLeft
637 return relX >= 0 && relX < lipgloss.Width(m.leanCheckbox())
638}
639
640// leanCheckbox renders the "Lean Mode" checkbox line.
641func (m *agentPickerModel) leanCheckbox() string {

Callers 2

handleMouseClickMethod · 0.95

Calls 4

panelOriginMethod · 0.95
cardRowsMethod · 0.95
leanCheckboxMethod · 0.95
WidthMethod · 0.45

Tested by 1