israel-dryer / ttkbootstrap

A supercharged theme extension for tkinter that enables on-demand modern flat style themes inspired by Bootstrap.
MIT License
1.99k stars 395 forks source link

Create local usertheme #411

Open kibbi10 opened 1 year ago

kibbi10 commented 1 year ago

Changed the function _load_themes within style.py where the user is able to define a set of themes within the project root (or in the code) rather having the theme residing inside the package root (e.g. ../site-packages/ttkbootstrap/themes/user.py).

The function now accepts any dict structured in the correct ttkbootstrap manner.

from local_theme import USER_THEMES

Style = ttk.Style()
Style._load_themes(USER_THEMES)