fix: dashboard layout overflow - remove forced panel height, fix contentH calculation
This commit is contained in:
parent
1bb7d1e909
commit
972b20eb55
1 changed files with 4 additions and 5 deletions
9
ui/ui.go
9
ui/ui.go
|
|
@ -811,8 +811,8 @@ func (m *model) handleJournalKeys(msg tea.KeyMsg) (tea.Cmd, bool) {
|
|||
}
|
||||
|
||||
func (m *model) recalculateTableSizes() {
|
||||
// Высота под таблицы: убираем верхние 16 строк (шапка, карточки, вкладки, строка помощи)
|
||||
tableHeight := m.height - 17
|
||||
// header(1) + KPI(4) + tabs(2) + tab-title(1) + helpbar(1) = 9 строк
|
||||
tableHeight := m.height - 10
|
||||
if tableHeight < 4 {
|
||||
tableHeight = 4
|
||||
}
|
||||
|
|
@ -1678,7 +1678,8 @@ func (m model) renderTabs() string {
|
|||
}
|
||||
|
||||
func (m model) renderTabContent() string {
|
||||
contentH := m.height - 17
|
||||
// header=1, KPIcards=4, tabs=2, helpbar=1, margin=1 → 9 строк сверху/снизу
|
||||
contentH := m.height - 9
|
||||
if contentH < 4 {
|
||||
contentH = 4
|
||||
}
|
||||
|
|
@ -1838,7 +1839,6 @@ func (m model) renderOverview(h int) string {
|
|||
|
||||
leftPanel := lipgloss.NewStyle().
|
||||
Width(leftW).
|
||||
Height(h).
|
||||
Border(lipgloss.RoundedBorder()).
|
||||
BorderForeground(lipgloss.Color(ColorBorder)).
|
||||
Padding(1, 2).
|
||||
|
|
@ -1867,7 +1867,6 @@ func (m model) renderOverview(h int) string {
|
|||
|
||||
rightPanel := lipgloss.NewStyle().
|
||||
Width(rightW).
|
||||
Height(h).
|
||||
Border(lipgloss.RoundedBorder()).
|
||||
BorderForeground(lipgloss.Color(ColorBorder)).
|
||||
Padding(1, 2).
|
||||
|
|
|
|||
Loading…
Reference in a new issue