def __init__(self, project_stats, **kwargs): defined_points_percentage = data.defined_points_percentage( project_stats) if defined_points_percentage <= 100.0: text = urwid.Text([ "Defined points: ", ("red", str(data.defined_points(project_stats))) ]) else: text = urwid.Text([ "Defined points: ", ("red", str(data.defined_points(project_stats))), " (", ("red", "+{0:.1f} %".format(defined_points_percentage - 100.0)), ")" ]) progressbar = urwid.ProgressBar("progressbar-normal-red", "progressbar-complete-red", data.defined_points(project_stats), data.total_points(project_stats), "progressbar-smooth-red") widget_list = [("weight", 0.4, text), ("weight", 0.6, urwid.Padding(progressbar, align='center', left=2, right=2))] super().__init__(widget_list, **kwargs)
def __init__(self, project_stats, **kwargs): text = urwid.Text(["Closed points: ", ("green", str(data.closed_points(project_stats)))]) progressbar = urwid.ProgressBar("progressbar-normal", "progressbar-complete", data.closed_points(project_stats), data.total_points(project_stats), "progressbar-smooth") widget_list = [("weight", 0.4, text), ("weight", 0.6, urwid.Padding(progressbar, align='center', left=2, right=2))] super().__init__(widget_list, **kwargs)
def __init__(self, project_stats, **kwargs): defined_points_percentage = data.defined_points_percentage(project_stats) if defined_points_percentage <= 100.0: text = urwid.Text(["Defined points: ", ("red", str(data.defined_points(project_stats)))]) else: text = urwid.Text(["Defined points: ", ("red", str(data.defined_points(project_stats))), " (", ("red", "+{0:.1f} %".format(defined_points_percentage - 100.0)), ")"]) progressbar = urwid.ProgressBar("progressbar-normal-red", "progressbar-complete-red", data.defined_points(project_stats), data.total_points(project_stats), "progressbar-smooth-red") widget_list = [("weight", 0.4, text), ("weight", 0.6, urwid.Padding(progressbar, align='center', left=2, right=2))] super().__init__(widget_list, **kwargs)
def __init__(self, project_stats, **kwargs): text = urwid.Text([ "Closed points: ", ("green", str(data.closed_points(project_stats))) ]) progressbar = urwid.ProgressBar("progressbar-normal", "progressbar-complete", data.closed_points(project_stats), data.total_points(project_stats), "progressbar-smooth") widget_list = [("weight", 0.4, text), ("weight", 0.6, urwid.Padding(progressbar, align='center', left=2, right=2))] super().__init__(widget_list, **kwargs)
def __init__(self, project_stats): text = ["Total points: ", ("cyan", str(data.total_points(project_stats)))] super().__init__(text)
def __init__(self, project_stats): text = [ "Total points: ", ("cyan", str(data.total_points(project_stats))) ] super().__init__(text)