1
0
Fork 0
mirror of https://github.com/amnweb/winmica.git synced 2026-06-29 05:54:10 +02:00
A simple Python package to enable Windows 11 Mica effects for PyQt6 applications using the official Windows API.
Find a file
AmN b8ee290606 feat: update Mica API to EnableMica and BackdropType
- Updated example usage in README and example files to reflect the new API.
- Bumped version to 1.0.3 to reflect these changes.
2025-09-30 20:29:38 +02:00
.github chore(version): bump version to 1.0.1 2025-07-22 02:50:38 +02:00
examples feat: update Mica API to EnableMica and BackdropType 2025-09-30 20:29:38 +02:00
src/winmica feat: update Mica API to EnableMica and BackdropType 2025-09-30 20:29:38 +02:00
LICENSE Initial commit 2025-07-16 19:22:39 +02:00
pyproject.toml feat: add initial implementation of Mica effects for Windows 2025-07-16 19:25:20 +02:00
README.md feat: update Mica API to EnableMica and BackdropType 2025-09-30 20:29:38 +02:00
setup.py feat: update Mica API to EnableMica and BackdropType 2025-09-30 20:29:38 +02:00

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 EnableMica, BackdropType, 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())
            EnableMica(hwnd, BackdropType.MICA)

if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = MyWindow()
    window.show()
    sys.exit(app.exec())

Features

  • Official Windows 11 Mica Effect
  • Simple API: EnableMica(hwnd, backdrop_type)
  • Works with PyQt6 windows (may also work with PySide6 or Tkinter, but not tested)
  • Detects system theme (light/dark)

Effect Types

  • BackdropType.MICA Standard Mica
  • BackdropType.MICA_ALT Alternative Mica
  • BackdropType.AUTO Auto (let Windows decide)

Result:

mica micaalt