添加进度条
This commit is contained in:
parent
c60307aa4c
commit
bc0f82125c
|
@ -58,7 +58,6 @@ class ProgressBar:
|
|||
x_n += 1
|
||||
y_n += 1
|
||||
|
||||
|
||||
def __init__(self, master=None, root_anim=None, w=200, h=8, colors="primary", color_list: None | dict = None):
|
||||
self.w = max(200, w)
|
||||
self.h = 8
|
||||
|
@ -67,7 +66,7 @@ class ProgressBar:
|
|||
if (color_list is not None):
|
||||
self.color = color_list
|
||||
if (root_anim == None):
|
||||
self.__root = master
|
||||
self.__root = master.root
|
||||
else:
|
||||
self.__root = root_anim
|
||||
|
||||
|
@ -94,7 +93,8 @@ class ProgressBar:
|
|||
self.color["border_light"], "rightside", bgcolor=self.color["background"])
|
||||
self.__fill_obj["fgbar"] = [
|
||||
self.canvas.create_rectangle(4, 1, self.__progress_pixel+4, self.h-1, width=0, fill=self.color[self.colors])]
|
||||
self.__draw_corner(0, 0, 1, 0, self.color[self.colors], "leftside",bgcolor=self.color["background"])
|
||||
self.__draw_corner(
|
||||
0, 0, 1, 0, self.color[self.colors], "leftside", bgcolor=self.color["background"])
|
||||
self.__draw_corner(1, 0, self.__progress_pixel+3, 0,
|
||||
self.color[self.colors], "rightprog")
|
||||
|
||||
|
|
Loading…
Reference in New Issue