mirror of
https://codeberg.org/adnano/wmenu.git
synced 2025-10-29 05:40:20 -04:00
Skip calculating input and item widths for vertical menu
This commit is contained in:
parent
0a38d45abb
commit
1e6793785d
1 changed files with 4 additions and 0 deletions
4
render.c
4
render.c
|
|
@ -32,6 +32,10 @@ void calc_widths(struct menu *menu) {
|
|||
menu->left_arrow = text_width(cairo, menu->font, "<") + 2 * menu->padding;
|
||||
menu->right_arrow = text_width(cairo, menu->font, ">") + 2 * menu->padding;
|
||||
|
||||
if (menu->lines > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate item widths and input area width
|
||||
for (size_t i = 0; i < menu->item_count; i++) {
|
||||
struct item *item = &menu->items[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue