on main help sign in
fix(ui): fix permissions dialog rendering on small windows (#2093)
56769bbAndrey Nering
internal/ui/dialog/permissions.go+2−1
@@ -48,7 +48,7 @@ const (
48 // layoutSpacingLines is the number of empty lines used for layout spacing.
48 // layoutSpacingLines is the number of empty lines used for layout spacing.
49 layoutSpacingLines = 4
49 layoutSpacingLines = 4
50 // minWindowWidth is the minimum window width before forcing fullscreen.
50 // minWindowWidth is the minimum window width before forcing fullscreen.
51− minWindowWidth = 60
51+ minWindowWidth = 77
52 // minWindowHeight is the minimum window height before forcing fullscreen.
52 // minWindowHeight is the minimum window height before forcing fullscreen.
53 minWindowHeight = 20
53 minWindowHeight = 20
54)
54)
@@ -392,6 +392,7 @@ func (p *Permissions) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor {
392 } else {
392 } else {
393 availableHeight = maxHeight - fixedHeight
393 availableHeight = maxHeight - fixedHeight
394 }
394 }
395+ availableHeight = max(availableHeight, 3)
395 } else {
396 } else {
396 availableHeight = maxHeight - headerHeight - buttonsHeight - helpHeight - frameHeight
397 availableHeight = maxHeight - headerHeight - buttonsHeight - helpHeight - frameHeight
397 }
398 }