changed images in Readme

This commit is contained in:
Tom Schimansky 2022-01-22 12:00:29 +01:00
parent c9b9f1a8c3
commit f15e620334
12 changed files with 12 additions and 11 deletions

View File

@ -136,11 +136,13 @@ also look acceptable on Windows. Maybe you can use the parameters for
Example 1:```examples/complex_example.py```
![](documentation_images/Windows_light.png)
![](documentation_images/Windows_complex_light.png)
![](documentation_images/Windows_complex_dark.png)
Example 2: ```examples/complex_example_custom_colors.py```
![](documentation_images/Windows_dark.png)
![](documentation_images/Windows_complex_other_style.png)
### CTkButton with images
It's also possible to put an image on a CTkButton. You just have to

View File

@ -1,4 +1,4 @@
__version__ = "1.8"
__version__ = "2.0"
from .customtkinter_button import CTkButton
from .customtkinter_slider import CTkSlider

View File

@ -19,7 +19,6 @@ class CTkColorManager:
@classmethod
def initialize_color_theme(cls, theme_name):
print("set theme", theme_name)
if theme_name.lower() == "blue":
cls.WINDOW_BG = ("#ECECEC", "#323232") # macOS standard light and dark window bg colors

View File

@ -75,7 +75,7 @@ class CTkEntry(tkinter.Frame):
width=1,
highlightthicknes=0,
**kwargs)
self.entry.grid(column=0, row=0, sticky="we", padx=self.corner_radius if self.corner_radius >= 5 else 5)
self.entry.grid(column=0, row=0, sticky="we", padx=self.corner_radius if self.corner_radius >= 6 else 6)
self.fg_parts = []
@ -206,7 +206,7 @@ class CTkEntry(tkinter.Frame):
elif self.corner_radius * 2 > self.width:
self.corner_radius = self.width / 2
self.entry.grid(column=0, row=0, sticky="we", padx=self.corner_radius if self.corner_radius >= 5 else 5)
self.entry.grid(column=0, row=0, sticky="we", padx=self.corner_radius if self.corner_radius >= 6 else 6)
del kwargs["corner_radius"]
require_redraw = True

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 KiB

After

Width:  |  Height:  |  Size: 644 KiB

View File

@ -42,20 +42,20 @@ class App(customtkinter.CTk):
corner_radius=0)
self.frame.place(relx=0.5, rely=0.5, anchor=tkinter.CENTER)
self.label_1 = customtkinter.CTkLabel(master=self.frame, corner_radius=10, width=200, height=60,
self.label_1 = customtkinter.CTkLabel(master=self.frame, corner_radius=6, width=200, height=60,
fg_color=("gray70", "gray20"), text="CustomTkinter\ninterface example")
self.label_1.place(relx=0.5, rely=0.3, anchor=tkinter.CENTER)
self.entry_1 = customtkinter.CTkEntry(master=self.frame, corner_radius=10, width=200)
self.entry_1 = customtkinter.CTkEntry(master=self.frame, corner_radius=20, width=200)
self.entry_1.place(relx=0.5, rely=0.52, anchor=tkinter.CENTER)
self.entry_1.insert(0, "username")
self.entry_2 = customtkinter.CTkEntry(master=self.frame, corner_radius=10, width=200, show="*")
self.entry_2 = customtkinter.CTkEntry(master=self.frame, corner_radius=20, width=200, show="*")
self.entry_2.place(relx=0.5, rely=0.6, anchor=tkinter.CENTER)
self.entry_2.insert(0, "password")
self.button_2 = customtkinter.CTkButton(master=self.frame, text="Login",
corner_radius=10, command=self.button_event, width=200)
corner_radius=6, command=self.button_event, width=200)
self.button_2.place(relx=0.5, rely=0.7, anchor=tkinter.CENTER)
def button_event(self):

View File

@ -19,7 +19,7 @@ def read(filename):
setup(name="customtkinter",
version="1.8",
version="2.0",
author="Tom Schimansky",
license="Creative Commons Zero v1.0 Universal",
url="https://github.com/TomSchimansky/CustomTkinter",