mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
fixed small scaling issues
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
import tkinter
|
||||
import customtkinter
|
||||
|
||||
root_tk = customtkinter.CTk()
|
||||
root_tk.geometry("400x240")
|
||||
|
||||
def button_function():
|
||||
root_tk.iconify()
|
||||
root_tk.after(1000, root_tk.deiconify)
|
||||
root_tk.after(2000, root_tk.destroy)
|
||||
|
||||
frame = tkinter.Frame()
|
||||
frame.pack(padx=10, pady=10, expand=True, fill="both")
|
||||
|
||||
button = customtkinter.CTkButton(frame, command=button_function)
|
||||
button.pack(pady=20, padx=20)
|
||||
|
||||
root_tk.mainloop()
|
22
test/visual_tests/test_iconify_destroy.py
Normal file
22
test/visual_tests/test_iconify_destroy.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import tkinter
|
||||
import customtkinter
|
||||
|
||||
root_tk = customtkinter.CTk()
|
||||
root_tk.geometry("400x240")
|
||||
|
||||
|
||||
def button_function():
|
||||
|
||||
top = customtkinter.CTkToplevel(root_tk)
|
||||
|
||||
root_tk.after(1000, top.iconify) # hide toplevel
|
||||
root_tk.after(1500, top.deiconify) # show toplevel
|
||||
root_tk.after(2500, root_tk.iconify) # hide root_tk
|
||||
root_tk.after(3000, root_tk.deiconify) # show root_tk
|
||||
root_tk.after(4000, root_tk.destroy) # destroy everything
|
||||
|
||||
|
||||
button = customtkinter.CTkButton(root_tk, command=button_function)
|
||||
button.pack(pady=20, padx=20)
|
||||
|
||||
root_tk.mainloop()
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 885 KiB After Width: | Height: | Size: 885 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@@ -10,6 +10,9 @@ root_tk = customtkinter.CTk() # create CTk window like you do with the Tk windo
|
||||
root_tk.geometry("400x480")
|
||||
root_tk.title("CustomTkinter Test")
|
||||
|
||||
root_tk.minsize(480, 480)
|
||||
root_tk.maxsize(520, 520)
|
||||
|
||||
print(customtkinter.ScalingTracker.get_window_scaling(root_tk))
|
||||
|
||||
def button_function():
|
||||
@@ -18,6 +21,7 @@ def button_function():
|
||||
|
||||
def slider_function(value):
|
||||
customtkinter.set_user_scaling(value * 2)
|
||||
customtkinter.ScalingTracker.set_window_scaling(value * 2)
|
||||
progressbar_1.set(value)
|
||||
|
||||
|
Reference in New Issue
Block a user