コード例 #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
ファイル: milestones.py プロジェクト: AVert/taiga-ncurses
 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
ファイル: milestones.py プロジェクト: AVert/taiga-ncurses
    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)])