mirror of
https://github.com/Gu1llaum-3/sshm.git
synced 2025-09-07 21:30:39 +02:00
fix: improve table height calculation for better UI responsiveness
This commit is contained in:
parent
7600eaaa9b
commit
420db56ff5
@ -149,13 +149,14 @@ func (m *Model) updateTableHeight() {
|
|||||||
// - Sort info: 1 line
|
// - Sort info: 1 line
|
||||||
// - Help text: 2 lines (multi-line text)
|
// - Help text: 2 lines (multi-line text)
|
||||||
// - App margins/spacing: 2 lines
|
// - App margins/spacing: 2 lines
|
||||||
// Total reserved: 11 lines, mais réduisons à 7 pour forcer plus d'espace
|
// Total reserved: 16 lines for more space
|
||||||
reservedHeight := 7 // Réduction agressive pour tester
|
reservedHeight := 16
|
||||||
availableHeight := m.height - reservedHeight
|
availableHeight := m.height - reservedHeight
|
||||||
hostCount := len(m.table.Rows())
|
hostCount := len(m.table.Rows())
|
||||||
|
|
||||||
// Minimum height should be at least 5 rows for usability
|
// Minimum height should be at least 3 rows for basic usability
|
||||||
minTableHeight := 6 // 1 header + 5 data rows
|
// Even in very small terminals, we want to show at least header + 2 hosts
|
||||||
|
minTableHeight := 4 // 1 header + 3 data rows minimum
|
||||||
maxTableHeight := availableHeight
|
maxTableHeight := availableHeight
|
||||||
if maxTableHeight < minTableHeight {
|
if maxTableHeight < minTableHeight {
|
||||||
maxTableHeight = minTableHeight
|
maxTableHeight = minTableHeight
|
||||||
|
Loading…
x
Reference in New Issue
Block a user