MCPcopy
hub / github.com/docker/docker-agent / handleWindowResize

Method handleWindowResize

pkg/tui/tui.go:1816–1830  ·  view source on GitHub ↗

handleWindowResize handles window resize.

(width, height int)

Source from the content-addressed store, hash-verified

1814
1815// handleWindowResize handles window resize.
1816func (m *appModel) handleWindowResize(width, height int) tea.Cmd {
1817 m.wWidth, m.wHeight = width, height
1818
1819 m.statusBar.SetWidth(width)
1820 m.tabBar.SetWidth(width - appPaddingHorizontal)
1821
1822 m.width = width
1823 m.height = height
1824
1825 if !m.ready {
1826 m.ready = true
1827 }
1828
1829 return m.resizeAll()
1830}
1831
1832// resizeAll recalculates all component sizes based on current window dimensions.
1833func (m *appModel) resizeAll() tea.Cmd {

Callers 1

updateMethod · 0.95

Calls 2

resizeAllMethod · 0.95
SetWidthMethod · 0.45

Tested by

no test coverage detected