mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
add font rendering to button, finished
This commit is contained in:
@@ -65,7 +65,7 @@ class TestApp(customtkinter.CTk):
|
||||
self.frame_2 = customtkinter.CTkFrame(master=self.ctk_frame, width=200, height=60)
|
||||
self.frame_2.place(relx=0.5, y=y + 80, anchor=tkinter.CENTER)
|
||||
|
||||
self.button_2 = customtkinter.CTkButton(master=self.ctk_frame, border_width=3, border_color=customtkinter.CTkColorManager.MAIN_HOVER,
|
||||
self.button_2 = customtkinter.CTkButton(master=self.ctk_frame, border_width=3, border_color=customtkinter.CTkThemeManager.MAIN_HOVER_COLOR,
|
||||
)
|
||||
self.button_2.place(relx=0.5, y=y + 160, anchor=tkinter.CENTER)
|
||||
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
#import tkinter.ttk as ttk
|
||||
import ctypes
|
||||
print(ctypes.windll.shcore.SetProcessDpiAwareness(ctypes.c_int(1)))
|
||||
|
||||
import tkinter
|
||||
import tkinter.ttk as ttk
|
||||
|
||||
app = tkinter.Tk()
|
||||
print(app.winfo_fpixels('1i'))
|
||||
#app.tk.call('tk', 'scaling', 1.0)
|
||||
print(app.winfo_fpixels('1i'))
|
||||
app.geometry("400x300")
|
||||
app.title("Standard Tkinter Test")
|
||||
|
||||
@@ -22,9 +28,9 @@ frame_1.pack(padx=60, pady=20, fill="both", expand=True)
|
||||
label_1 = tkinter.Label(master=frame_1, text="Label", bg="lightgray")
|
||||
label_1.pack(pady=y_padding, padx=10)
|
||||
|
||||
progressbar_1 = ttk.Progressbar(master=frame_1,style='black.Horizontal.TProgressbar', length=150)
|
||||
progressbar_1.pack(pady=y_padding, padx=10)
|
||||
progressbar_1["value"] = 50
|
||||
#progressbar_1 = ttk.Progressbar(master=frame_1,style='black.Horizontal.TProgressbar', length=150)
|
||||
#progressbar_1.pack(pady=y_padding, padx=10)
|
||||
#progressbar_1["value"] = 50
|
||||
|
||||
button_1 = tkinter.Button(master=frame_1, command=button_function, text="Button", highlightbackground="lightgray")
|
||||
button_1.pack(pady=y_padding, padx=10)
|
||||
|
||||
Reference in New Issue
Block a user