converted ui to grid geometry manager
authorShane Pepperell <shane.pepperell@me.com>
Sat, 14 Jan 2023 02:36:46 +0000 (02:36 +0000)
committerShane Pepperell <shane.pepperell@me.com>
Sat, 14 Jan 2023 02:36:46 +0000 (02:36 +0000)
announcer.pyw

index bb240e116c13b1438bea55ea96bac2e9246438fa..a11f1436e2702b7c61dac1adcd152b235432719d 100644 (file)
@@ -259,10 +259,10 @@ if __name__ == '__main__':
     gui.protocol("WM_DELETE_WINDOW", close_script)
     volume_slider = Scale(gui, from_=0, to=100, orient=HORIZONTAL, command=update_volume)
     volume_slider.set(100)
-    volume_slider.pack()
+    volume_slider.grid(row=0, column=0)
     mute_button = Button(gui, text='Mute', command=mute)
-    mute_button.pack()
-    Button(gui, text='Test volume', command=play_random_sound).pack()
+    mute_button.grid(row=0, column=1)
+    Button(gui, text='Test volume', command=play_random_sound).grid()
     announcer_thread = threading.Thread(target=announcer_loop)
     announcer_thread.start()
     mainloop()