add faction widget for progressbar
This commit is contained in:
@@ -148,6 +148,12 @@ class Percentage(ProgressBarWidget):
|
|||||||
def update(self, pbar):
|
def update(self, pbar):
|
||||||
return '%3d%%' % pbar.percentage()
|
return '%3d%%' % pbar.percentage()
|
||||||
|
|
||||||
|
class FractionWidget(ProgressBarWidget):
|
||||||
|
def __init__(self, sep=' / '):
|
||||||
|
self.sep = sep
|
||||||
|
def update(self, pbar):
|
||||||
|
return '%2d%s%2d' % (pbar.currval, self.sep, pbar.maxval)
|
||||||
|
|
||||||
class Bar(ProgressBarWidgetHFill):
|
class Bar(ProgressBarWidgetHFill):
|
||||||
"The bar of progress. It will strech to fill the line."
|
"The bar of progress. It will strech to fill the line."
|
||||||
def __init__(self, marker='#', left='|', right='|'):
|
def __init__(self, marker='#', left='|', right='|'):
|
||||||
|
|||||||
Reference in New Issue
Block a user