INNER CODE UNIT · Go
func
smtg-ai/claude-squad · app/app.go:156
func (m *home) updateHandleWindowSizeEvent(msg tea.WindowSizeMsg) {
// List takes 30% of width, preview takes 70%
listWidth := int(float32(msg.Width) * 0.3)
tabsWidth := msg.Width - listWidth
// Menu takes 10% of height, list and window take 90%
contentHeight := int(float32(msg.Height) * 0.9)
menuHeight := msg.Height - contentHeight - 1 // minus 1 for error box
m.errBox.SetSize(int(float32(msg.Width)*0.9), 1) // error box takes 1 row
m.tabbedWindow.SetSize(tabsWidth, contentHeight)
m.list.SetSize(listWidth, contentHeight)
if m.textInputOverlay != nil {
m.textInputOverlay.SetSize(int(float32(msg.Width)*0.6), int(float32(msg.Height)*0.4))
}
if m.textOverlay != nil {
m.textOverlay.SetWidth(int(float32(msg.Width) * 0.6))