mirror of
https://github.com/limine-bootloader/limine
synced 2024-11-24 17:39:40 +03:00
menu: Fix a couple of boot menu alignment issues
This commit is contained in:
parent
8f167bc2e5
commit
5bdb1bbf55
@ -504,9 +504,11 @@ static size_t print_tree(size_t offset, size_t window, const char *shift, size_t
|
||||
if (max_len == NULL) {
|
||||
max_len = &dummy_max_len;
|
||||
}
|
||||
if (!level) {
|
||||
*max_len = 0;
|
||||
}
|
||||
if (shift == NULL) {
|
||||
no_print = true;
|
||||
*max_len = 0;
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
@ -813,7 +815,7 @@ refresh:
|
||||
print_tree(tree_offset, terms[0]->rows - 10, NULL, 0, 0, selected_entry, menu_tree,
|
||||
&selected_menu_entry, &max_tree_len);
|
||||
|
||||
size_t tree_prefix_len = terms[0]->cols / 2 - max_tree_len / 2;
|
||||
size_t tree_prefix_len = terms[0]->cols / 2 - DIV_ROUNDUP(max_tree_len, 2);
|
||||
if (!serial) tree_prefix_len += strlen("│") - 1;
|
||||
char *tree_prefix = ext_mem_alloc(tree_prefix_len);
|
||||
memset(tree_prefix, ' ', tree_prefix_len);
|
||||
|
Loading…
Reference in New Issue
Block a user