From 5def01e05274c942aa5d14d7d007ccf87fc97215 Mon Sep 17 00:00:00 2001 From: Ville Rantanen Date: Tue, 7 Mar 2017 16:05:50 +0200 Subject: [PATCH] add a little space around boxes --- reporting/markslider.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/reporting/markslider.py b/reporting/markslider.py index a00c106..c30bcfd 100755 --- a/reporting/markslider.py +++ b/reporting/markslider.py @@ -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()