💄 Add progressbar as timer
+ remove one bug and updates dependencies
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import copy
|
||||
from tkinter import *
|
||||
|
||||
import PIL
|
||||
from PIL import ImageTk, Image, ImageOps
|
||||
|
||||
|
||||
@@ -16,6 +18,9 @@ class ImagePlaceholder:
|
||||
self.image_label.pack(side=TOP, fill=BOTH, expand=1)
|
||||
|
||||
def display_new_image(self):
|
||||
if len(self.images) == 0:
|
||||
self.image_window.on_closing()
|
||||
return
|
||||
image_path = self.images.pop(0)
|
||||
if image_path == "break":
|
||||
self.is_break = True
|
||||
@@ -35,7 +40,7 @@ class ImagePlaceholder:
|
||||
if w < 21 or h < 21:
|
||||
w = 1280
|
||||
h = 1024
|
||||
self.current_image.thumbnail((w - 20, h - 20), Image.ANTIALIAS)
|
||||
self.current_image.thumbnail((w - 20, h - 20), PIL.Image.Resampling.LANCZOS)
|
||||
|
||||
if reload:
|
||||
self.load_widget()
|
||||
|
Reference in New Issue
Block a user