handleWindowResize handles window resize.
(width, height int)
| 1814 | |
| 1815 | // handleWindowResize handles window resize. |
| 1816 | func (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. |
| 1833 | func (m *appModel) resizeAll() tea.Cmd { |