fix: Dynamically calculate help popup height to show all help items
This commit is contained in:
parent
a66b06daab
commit
4e07164bdc
3
gtm
3
gtm
|
|
@ -655,7 +655,8 @@ def draw_help_popup(stdscr, state):
|
||||||
|
|
||||||
# Calculate popup dimensions and position
|
# Calculate popup dimensions and position
|
||||||
popup_width = 60
|
popup_width = 60
|
||||||
popup_height = 20
|
# Calculate height based on number of help items plus margins
|
||||||
|
popup_height = len(help_items) + 5 # 5 extra lines for borders, title, and footer
|
||||||
popup_x = max(0, (state.width - popup_width) // 2)
|
popup_x = max(0, (state.width - popup_width) // 2)
|
||||||
popup_y = max(0, (state.height - popup_height) // 2)
|
popup_y = max(0, (state.height - popup_height) // 2)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue