예제 #1
0
 def __init__(self, milestone_stats):
     items = [generic.box_solid_fill(" ", 1)]
     items.append(
         urwid.ProgressBar("progressbar-normal", "progressbar-complete",
                           data.milestone_completed_points(milestone_stats),
                           data.milestone_total_points(milestone_stats),
                           "progressbar-smooth"))
     super().__init__(items)
예제 #2
0
 def __init__(self, milestone_stats):
     items = [generic.box_solid_fill(" ", 1)]
     items.append(urwid.ProgressBar("progressbar-normal",
                                    "progressbar-complete",
                                    data.milestone_completed_points(milestone_stats),
                                    data.milestone_total_points(milestone_stats),
                                    "progressbar-smooth"))
     super().__init__(items)
예제 #3
0
    def __init__(self, milestone_stats):
        total = data.milestone_total_points(milestone_stats)
        completed = data.milestone_completed_points(milestone_stats)
        remaining = total - completed

        items = [
            urwid.Pile([generic.ListText("Total"), generic.SemaphorePercentText(total, max_value=total)]),
            urwid.Pile([generic.ListText("Completed"), generic.SemaphorePercentText(completed, max_value=total)]),
            urwid.Pile([generic.ListText("Remaining"), generic.SemaphorePercentText(remaining, max_value=total,
                                                                                    invert=True)])
        ]
        super().__init__([urwid.Columns(items)])
예제 #4
0
    def __init__(self, milestone_stats):
        total = data.milestone_total_points(milestone_stats)
        completed = data.milestone_completed_points(milestone_stats)
        remaining = total - completed

        items = [
            urwid.Pile([
                generic.ListText("Total"),
                generic.SemaphorePercentText(total, max_value=total)
            ]),
            urwid.Pile([
                generic.ListText("Completed"),
                generic.SemaphorePercentText(completed, max_value=total)
            ]),
            urwid.Pile([
                generic.ListText("Remaining"),
                generic.SemaphorePercentText(remaining,
                                             max_value=total,
                                             invert=True)
            ])
        ]
        super().__init__([urwid.Columns(items)])