No more needed to use -i to disable icon padding

Now xmenu detects if a menu has an icon, and if it doesn't have, the
menu will not have the gaps fgor icons, making the -i flag unecessary
to disable the padding.   The -i option is still necessary, however,
to speed up xmenu loading, since it disables imlib2 initialization
routines.
This commit is contained in:
phillbush
2020-07-30 17:04:04 -03:00
parent c15958bd96
commit a2ff706d6f
2 changed files with 7 additions and 2 deletions

View File

@@ -84,6 +84,7 @@ struct Menu {
struct Item *list; /* list of items contained by the menu */
struct Item *selected; /* item currently selected in the menu */
int x, y, w, h; /* menu geometry */
int hasicon; /* whether the menu has item with icons */
int drawn; /* whether the menu was already drawn */
unsigned level; /* menu level relative to root */
Window win; /* menu window to map on the screen */