mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
added screenshots for Windows
This commit is contained in:
parent
4301419228
commit
e6d71058aa
18
Readme.md
18
Readme.md
@ -116,6 +116,24 @@ colors and removed the round corners, and added a border to the buttons:
|
||||
|
||||
![](documentation_images/complex_example_other_style.png)
|
||||
|
||||
### Customtkinter on Windows/Linux
|
||||
|
||||
All elements of Customtkinter are drawn on the ```tkinter.Canvas```.
|
||||
But the Tkinter canvas supports antialiasing only on macOS, so on Windows
|
||||
and Linux the elements are rendered in a much worse quality. So you have
|
||||
to experiment with the ```corner_radius``` and look when the rounded corners
|
||||
look best. I tried to design the too complex example programs so that they
|
||||
also look acceptable on Windows. Maybe you can use the parameters for
|
||||
```corner_radius``` and ```width``` for your program as well.
|
||||
|
||||
Example 1:```examples/complex_example.py```
|
||||
|
||||
![](documentation_images/Windows_light.png)
|
||||
|
||||
Example 2: ```examples/complex_example_other_style.py```
|
||||
|
||||
![](documentation_images/Windows_dark.png)
|
||||
|
||||
### CTkButton with images
|
||||
It's also possible to put an image on a CTkButton. You just have to
|
||||
pass a PhotoImage object to the CTkButton with the argument ``image``.
|
||||
|
@ -17,7 +17,7 @@ class CTkCheckBox(tkinter.Frame):
|
||||
border_width=3,
|
||||
width=25,
|
||||
height=25,
|
||||
corner_radius=5,
|
||||
corner_radius=4,
|
||||
text_font=None,
|
||||
text_color=CTkColorManager.TEXT,
|
||||
text="CTkCheckBox",
|
||||
|
@ -136,7 +136,7 @@ class CTkProgressBar(tkinter.Frame):
|
||||
else:
|
||||
# ovals and rects are always rendered too large on Windows and need to be made smaller by -1
|
||||
oval_bottom_right_shift = -1
|
||||
rect_bottom_right_shift = -1
|
||||
rect_bottom_right_shift = -0
|
||||
|
||||
# frame_border
|
||||
if self.border_width > 0:
|
||||
|
@ -147,7 +147,7 @@ class CTkSlider(tkinter.Frame):
|
||||
|
||||
# ovals and rects are always rendered too large and need to be made smaller by -1
|
||||
oval_bottom_right_shift = -1
|
||||
rect_bottom_right_shift = -1
|
||||
rect_bottom_right_shift = 0
|
||||
|
||||
# frame_border
|
||||
if self.border_width > 0:
|
||||
|
BIN
documentation_images/Windows_dark.png
Executable file
BIN
documentation_images/Windows_dark.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
documentation_images/Windows_light.png
Executable file
BIN
documentation_images/Windows_light.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
@ -130,7 +130,7 @@ class App(tkinter.Tk):
|
||||
self.entry = customtkinter.CTkEntry(master=self.frame_right,
|
||||
width=120,
|
||||
height=25,
|
||||
corner_radius=10)
|
||||
corner_radius=8)
|
||||
self.entry.place(relx=0.33, rely=0.92, anchor=tkinter.CENTER)
|
||||
self.entry.insert(0, "CTkEntry")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user