diff --git a/test/manual_integration_tests/test_window_behavior/test_ctk_appearance_mode_change.py b/test/manual_integration_tests/test_ctk_behavior/test_ctk_appearance_mode_change.py similarity index 100% rename from test/manual_integration_tests/test_window_behavior/test_ctk_appearance_mode_change.py rename to test/manual_integration_tests/test_ctk_behavior/test_ctk_appearance_mode_change.py diff --git a/test/manual_integration_tests/test_window_behavior/test_ctk_iconify_at_beginning.py b/test/manual_integration_tests/test_ctk_behavior/test_ctk_iconify_at_beginning.py similarity index 100% rename from test/manual_integration_tests/test_window_behavior/test_ctk_iconify_at_beginning.py rename to test/manual_integration_tests/test_ctk_behavior/test_ctk_iconify_at_beginning.py diff --git a/test/manual_integration_tests/test_window_behavior/test_ctk_withdraw_at_beginning.py b/test/manual_integration_tests/test_ctk_behavior/test_ctk_withdraw_at_beginning.py similarity index 100% rename from test/manual_integration_tests/test_window_behavior/test_ctk_withdraw_at_beginning.py rename to test/manual_integration_tests/test_ctk_behavior/test_ctk_withdraw_at_beginning.py diff --git a/test/manual_integration_tests/test_window_behavior/test_ctk_zoomed_state.py b/test/manual_integration_tests/test_ctk_behavior/test_ctk_zoomed_state.py similarity index 100% rename from test/manual_integration_tests/test_window_behavior/test_ctk_zoomed_state.py rename to test/manual_integration_tests/test_ctk_behavior/test_ctk_zoomed_state.py diff --git a/test/manual_integration_tests/test_ctk_toplevel_behavior/test_ctk_toplevel_appearance_mode_change.py b/test/manual_integration_tests/test_ctk_toplevel_behavior/test_ctk_toplevel_appearance_mode_change.py new file mode 100644 index 0000000..3778be8 --- /dev/null +++ b/test/manual_integration_tests/test_ctk_toplevel_behavior/test_ctk_toplevel_appearance_mode_change.py @@ -0,0 +1,35 @@ +import customtkinter +import sys + +customtkinter.set_appearance_mode("dark") + + +app = customtkinter.CTk() +app.geometry("400x400+300+300") + +toplevel = customtkinter.CTkToplevel(app) +toplevel.geometry("350x240+800+300") + + +def change_appearance_mode(): + # test appearance mode change while withdrawn + app.after(500, toplevel.withdraw) + app.after(1500, lambda: customtkinter.set_appearance_mode("light")) + app.after(2500, toplevel.deiconify) + + # test appearance mode change while iconified + app.after(3500, toplevel.iconify) + app.after(4500, lambda: customtkinter.set_appearance_mode("dark")) + app.after(5500, toplevel.deiconify) + + if sys.platform.startswith("win"): + # test appearance mode change while zoomed + app.after(6500, lambda: toplevel.state("zoomed")) + app.after(7500, lambda: customtkinter.set_appearance_mode("light")) + app.after(8500, lambda: toplevel.state("normal")) + + +button_1 = customtkinter.CTkButton(app, text="start test", command=change_appearance_mode) +button_1.pack(pady=20, padx=20) + +app.mainloop() diff --git a/test/manual_integration_tests/test_ctk_toplevel_behavior/test_ctk_toplevel_iconify_at_beginning.py b/test/manual_integration_tests/test_ctk_toplevel_behavior/test_ctk_toplevel_iconify_at_beginning.py new file mode 100644 index 0000000..f2cc474 --- /dev/null +++ b/test/manual_integration_tests/test_ctk_toplevel_behavior/test_ctk_toplevel_iconify_at_beginning.py @@ -0,0 +1,12 @@ +import customtkinter + +app = customtkinter.CTk() +app.geometry("400x400+300+300") + +toplevel = customtkinter.CTkToplevel(app) +toplevel.geometry("350x240+800+300") + +toplevel.iconify() +toplevel.after(2000, toplevel.deiconify) + +app.mainloop() diff --git a/test/manual_integration_tests/test_ctk_toplevel_behavior/test_ctk_toplevel_withdraw_at_beginning.py b/test/manual_integration_tests/test_ctk_toplevel_behavior/test_ctk_toplevel_withdraw_at_beginning.py new file mode 100644 index 0000000..7b58cd0 --- /dev/null +++ b/test/manual_integration_tests/test_ctk_toplevel_behavior/test_ctk_toplevel_withdraw_at_beginning.py @@ -0,0 +1,12 @@ +import customtkinter + +app = customtkinter.CTk() +app.geometry("400x400+300+300") + +toplevel = customtkinter.CTkToplevel(app) +toplevel.geometry("350x240+800+300") + +toplevel.withdraw() +toplevel.after(2000, toplevel.deiconify) + +app.mainloop() diff --git a/test/manual_integration_tests/test_ctk_toplevel_behavior/test_ctk_toplevel_zoomed_state.py b/test/manual_integration_tests/test_ctk_toplevel_behavior/test_ctk_toplevel_zoomed_state.py new file mode 100644 index 0000000..52a8588 --- /dev/null +++ b/test/manual_integration_tests/test_ctk_toplevel_behavior/test_ctk_toplevel_zoomed_state.py @@ -0,0 +1,29 @@ +import customtkinter + +customtkinter.set_appearance_mode("dark") + +app = customtkinter.CTk() +app.geometry("400x400+300+300") + +toplevel = customtkinter.CTkToplevel(app) +toplevel.geometry("350x240+800+300") + + +def change_appearance_mode(): + # test zoom with withdraw + app.after(1000, lambda: toplevel.state("zoomed")) + app.after(2000, toplevel.withdraw) + app.after(3000, toplevel.deiconify) + app.after(4000, lambda: toplevel.state("normal")) + + # test zoom with iconify + app.after(5000, lambda: toplevel.state("zoomed")) + app.after(6000, toplevel.iconify) + app.after(7000, toplevel.deiconify) + app.after(8000, lambda: toplevel.state("normal")) + + +button_1 = customtkinter.CTkButton(app, text="start test", command=change_appearance_mode) +button_1.pack(pady=20, padx=20) + +app.mainloop()