🐛 Make sound works with executable

Fix #23
This commit is contained in:
2023-05-24 17:25:17 +02:00
parent 508e384858
commit d1400da930
3 changed files with 14 additions and 3 deletions

View File

@@ -13,6 +13,8 @@ class ImageWindow:
self.window = Toplevel(app.root)
self.window.title("Image")
self.window.geometry("1280x1024")
self.window.protocol("WM_DELETE_WINDOW", self.on_closing)
self.option = {
"bw": False,
"mirror": False,
@@ -33,6 +35,9 @@ class ImageWindow:
self.toolbar = Toolbar(self, self.timer)
self.image = ImagePlaceholder(self, self.images)
def on_closing(self):
self.countdown_sound.stop()
def next_image(self):
if self.toolbar.timer_check is not None:
self.window.after_cancel(self.toolbar.timer_check)
@@ -41,10 +46,8 @@ class ImageWindow:
def lets_draw(self, images, timer):
random.shuffle(images)
# self.images = images
self.image.images = images
self.toolbar.timer = timer
# self.timer = timer
self.next_image()
def play_countdown(self):