mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
readme change
This commit is contained in:
parent
4374884d65
commit
8370521d2a
17
Readme.md
17
Readme.md
@ -254,4 +254,19 @@ fg_color | forground color, tuple: (light_color, dark_color) or single color
|
||||
bg_color | background color, tuple: (light_color, dark_color) or single color
|
||||
</details>
|
||||
|
||||
#
|
||||
### Special commands
|
||||
Use macOS darkmode window style:
|
||||
```python
|
||||
import customtkinter
|
||||
|
||||
customtkinter.enable_macos_darkmode() # get darkmode window style
|
||||
customtkinter.disable_macos_darkmode() # disable darkmode (important!)
|
||||
```
|
||||
|
||||
If you dont use ``root_tk.mainloop()``, then you have to deactivate
|
||||
the threaded search for a change of the system appearance mode, and
|
||||
do it yourself in your main loop where you call ``root_tk.update()``.
|
||||
```python
|
||||
customtkinter.deactivate_threading() # call this at the beginning
|
||||
customtkinter.update_appearance_mode() # then call this in the loop
|
||||
```
|
||||
|
@ -65,7 +65,7 @@ def activate_threading():
|
||||
AppearanceModeTracker.init_listener_function()
|
||||
|
||||
|
||||
def update_theme():
|
||||
def update_appearance_mode():
|
||||
if isinstance(AppearanceModeTracker.system_mode_listener, SystemAppearanceModeListenerNoThread):
|
||||
AppearanceModeTracker.system_mode_listener.update()
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user