add a little space around boxes
This commit is contained in:
@@ -398,11 +398,11 @@ def print_help(reader,opts):
|
||||
''' Create a window with help message '''
|
||||
helptext=get_interactive_help_text().split('\n')
|
||||
maxlen=max([len(x) for x in helptext])
|
||||
bc.posprint(3,6,"+"+"-"*maxlen+"+")
|
||||
bc.posprint(4,6,colorify("|${U}${Y}"+("{:^"+str(maxlen)+"}").format("Help")+"${Z}|",opts))
|
||||
bc.posprint(3,5," +"+"-"*maxlen+"+ ")
|
||||
bc.posprint(4,5,colorify(" |${U}${Y}"+("{:^"+str(maxlen)+"}").format("Help")+"${Z}| ",opts))
|
||||
for y,row in enumerate(helptext):
|
||||
bc.posprint(5+y,6,("|{:<"+str(maxlen)+"}|").format(row))
|
||||
bc.posprint(6+y,6,"+"+"-"*maxlen+"+")
|
||||
bc.posprint(5+y,5,(" |{:<"+str(maxlen)+"}| ").format(row))
|
||||
bc.posprint(6+y,5," +"+"-"*maxlen+"+ ")
|
||||
sys.stdout.write(bc.pos(opts.size[0], opts.size[1]))
|
||||
inkey=getch.get()
|
||||
|
||||
@@ -411,7 +411,7 @@ def print_toc(reader,opts):
|
||||
text=reader.get_toc(display_position=True)
|
||||
title=opts.toc if opts.toc else "Table of Contents"
|
||||
maxlen=max([len(x) for x in text])
|
||||
bc.posprint(3,3,"+"+"-"*maxlen+"+")
|
||||
bc.posprint(3,2," +"+"-"*maxlen+"+ ")
|
||||
parsed=md_color.parse(text)
|
||||
if opts.autocolor:
|
||||
colored=md_color.colorize(parsed,not opts.color,opts.dark_colors)
|
||||
@@ -422,9 +422,9 @@ def print_toc(reader,opts):
|
||||
else:
|
||||
colored=[bc.nocolor_string(row[1]) for row in parsed]
|
||||
for y,row in enumerate(colored):
|
||||
bc.posprint(4+y,3,("|{:<"+str(maxlen)+"}|").format(" "))
|
||||
bc.posprint(4+y,2,(" |{:<"+str(maxlen)+"}| ").format(" "))
|
||||
bc.posprint(4+y,3,("|{:<"+str(maxlen)+"}").format(row))
|
||||
bc.posprint(5+y,3,"+"+"-"*maxlen+"+")
|
||||
bc.posprint(5+y,2," +"+"-"*maxlen+"+ ")
|
||||
sys.stdout.write(bc.pos(opts.size[0], opts.size[1]))
|
||||
inkey=getch.get()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user