Skip to content

A Python ttk port of [tcl-awthemes], featuring light, dark, and scalable themes.

License

Notifications You must be signed in to change notification settings

undecV/python-awthemes

Repository files navigation

Python-Awthemes

This project is a port of the tcl-awthemes from Tcl/Tk to Python.

Awthemes is a library designed for Tcl/Tk, featuring elegant themes such as light, dark, with scalable options. These stylish themes are now accessible for use in Python's Tkinter applications, making it easier for Python developers to design modern and visually engaging GUI applications.

Glances

Check out Awthemes' screenshots and demos here.

Install

Install from PyPI (Recommended)

Python-Awthemes is available in PyPI.

pip install python-awthemes

alternatively, add this to your requirements.txt file:

python-awthemes

Install from GitHub

pip install git+https://github.com/undecV/python-awthemes

alternatively, add this to your requirements.txt file:

python-awthemes @ git+https://github.com/undecV/python-awthemes.git@main

Useage

from awthemes import AwthemesStyle

root = tk.Tk()

# Load AwthemesStyle for your Tk root.
style = AwthemesStyle(root)

# Get all avaliable themes.
themes = style.theme_names()

# Set the theme.
style.theme_use("awdark")

Development Remark

  • Tested for compatibility with pygubu (GitHub) and pygubu-designer (GitHub).
  • Tested for compatibility with pyinstaller (Homepage).
    • Add the argument --collect-all "awthemes" to your command.
    • If you're using scalable themes, include the argument --collect-all "tksvg" in the command as well.
  • Tested for compatibility with ttkwidgets (PyPi).

Reference