Fix for EvMenu width

This commit is contained in:
DarkSir23 2019-05-17 19:06:49 -04:00
parent 6ebbf9c4ee
commit b74de1c673

View file

@ -1005,13 +1005,16 @@ class EvMenu(object):
else:
# add a default white color to key
table.append(" |lc%s|lt|w%s|n|le%s" % (raw_key, raw_key, desc_string))
logger.log_msg('Table Width Max: %s' % table_width_max)
logger.log_msg('Max Width: %d' % _MAX_TEXT_WIDTH)
ncols = (_MAX_TEXT_WIDTH // table_width_max) # number of ncols
logger.log_msg('Max Columns: %d' % ncols)
ncols = (_MAX_TEXT_WIDTH // table_width_max) + 1 # number of ncols
if ncols <= 0:
if ncols < 0:
# no visible option at all
return ""
ncols = ncols + 1 if ncols == 0 else ncols
# get the amount of rows needed (start with 4 rows)
nrows = 4
while nrows * ncols < nlist: