Windows 11 Mica backdrop effects using official Windows API
Project description
winmica
A simple Python package to enable Windows 11 Mica effects for PyQt6 applications using the official Windows API.
Installation
Install this package (from the project root):
pip install winmica
Usage Example (PyQt6)
from PyQt6.QtWidgets import QApplication, QMainWindow
from PyQt6.QtCore import Qt
from winmica import ApplyMica, MicaType, is_mica_supported
import sys
class MyWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("Mica Example")
self.setGeometry(100, 100, 600, 400)
self.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground, True)
if is_mica_supported():
hwnd = int(self.winId())
ApplyMica(hwnd, MicaType.MICA)
if __name__ == "__main__":
app = QApplication(sys.argv)
window = MyWindow()
window.show()
sys.exit(app.exec())
Features
- Official Windows 11 Mica Effect
- Simple API:
ApplyMica(hwnd, effect_type) - Works with PyQt6 windows (may also work with PySide6 or Tkinter, but not tested)
- Detects system theme (light/dark)
Effect Types
MicaType.MICA– Standard MicaMicaType.MICA_ALT– Alternative MicaMicaType.AUTO– Auto (let Windows decide)
Result:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
winmica-1.0.2.tar.gz
(4.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file winmica-1.0.2.tar.gz.
File metadata
- Download URL: winmica-1.0.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
517f4e72c13bd6d3f26846dfee462165f48b065cf8d7e9af914dbf183f14db23
|
|
| MD5 |
9ab15ffcba0e0eb276f26097180469e2
|
|
| BLAKE2b-256 |
8671fca6896a7929f784c81d704590cdae4628107d1e3990d319a99db6355cab
|
File details
Details for the file winmica-1.0.2-py3-none-any.whl.
File metadata
- Download URL: winmica-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d8cda6c15d002d303cd7d88911ca1ce3c6f14b2018e903d958286b4c1d33d45
|
|
| MD5 |
b47fcfbf66629808b27e78c616d6f451
|
|
| BLAKE2b-256 |
be5b5452d3af5d7c31555f67858957200a609d4c39f3a91e960416efc6042bc2
|