TkWin11
Windows 11 Fluent-style themes and widgets for Python's tkinter / ttk.
纯 Tkinter / ttk 实现的 Windows 11 Fluent 风格主题与控件库。
Installation / 安装
python -m pip install tkwin11
Requires Python 3.8+ with Tkinter available. Developed and tested on Windows 11
with Python 3.11. Windows-specific title bars, Snap and per-monitor DPI features
are enabled only on Windows; other platforms use the ordinary system title bar
and have not been fully tested. On Linux, install your distribution's Tkinter
package (often python3-tk) if needed. Tkinter is not installed by pip.
Core widgets require no third-party packages. ImageViewer can optionally use
Pillow for JPEG, WebP and additional image formats.
Quick start / 快速开始
For an existing program, call install() before creating its first Tk root:
import tkinter as tk
from tkinter import ttk
import tkwin11
tkwin11.install()
root = tk.Tk()
root.title("TkWin11 example")
ttk.Entry(root).pack(padx=24, pady=12)
ttk.Button(root, text="Save").pack(padx=24, pady=12)
root.mainloop()
New programs may instead call enable_dpi_awareness() before tk.Tk() and
apply_theme(root) before creating widgets.
The library includes Fluent buttons, switches, navigation, custom title bars, menus, dialogs, tooltips, tables, spreadsheets, charts and form controls.
Window transitions / 窗口过渡
install() defaults to window_flicker_workaround=True. This experimental
workaround only affects windows using the library's custom title bars; it does
not add a title bar to ordinary Tk windows. To disable it:
tkwin11.install(window_flicker_workaround=False)
WindowChrome, FluentWindowChrome and FluentTitleBar also accept this option
per window. Applications using manual theme initialization do not enable it
unless requested. The workaround is timing-based, not a root-cause rendering
fix; occluded windows fall back to native restore behavior.
Demo and documentation
Download the GitHub source or source
distribution, then run python main.py to open the Gallery. The wheel installs
the library; the Gallery stays in the source distribution.
MIT license. Derived from TkWebUI; see the included LICENSE for attribution.
Metadata
Release files for tkwin11 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tkwin11-0.2.3.tar.gz | 760.5 kB | Without provenance | Details for tkwin11-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tkwin11-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for tkwin11-0.2.3-py3-none-any.whl |
Total release size: 927.0 kB
Release files / tkwin11-0.2.3.tar.gz
| Download URL | tkwin11-0.2.3.tar.gz |
|---|---|
| Size | 760.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
252b2322eb0b3f70332e8e6f4b6165cd6e4b944b26d79227167d842d276c99ee
|
|
BLAKE2b-256 checksum How to use checksums |
28eb32555540eec70dc222041674761867954cf53031ec5d308083eb3d81b059
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.5
|
Release files / tkwin11-0.2.3-py3-none-any.whl
| Download URL | tkwin11-0.2.3-py3-none-any.whl |
|---|---|
| Size | 166.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7945795936e420d0f506d7873e4ea1671a257e62491026cddd7451730d02dacc
|
|
BLAKE2b-256 checksum How to use checksums |
4814c4bea0b39626474cd96fe7d438fb35d68bc98362e85aaf4b056c391d6f38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.5
|
Security for tkwin11 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.