snehccurry / PythonBlurBehind

Windows 10 UWP Acrylic in PySide, Tkinter, etc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation

You can install it with pip:

python -m pip install BlurWindow

Preview:

https://i.imgur.com/sBNxXQE.png

Parameters/Functions:

#HWND = PID
#Acrylic = True/False #For Acrylic Design (lag WorkAround https://github.com/Peticali/PythonBlurBehind/blob/main/Examples%20MUST%20SEE/LagWorkAround.py)
#hexColor = Background color, False for nothing (in acrylic the first byte is noise opacity and the remaining in order Blue, Green, Red)
#Dark = White icons
#QWidget = Your parent (for Mac)
#Material = https://developer.apple.com/documentation/appkit/nsvisualeffectmaterial

blur(HWND,hexColor=False,Acrylic=False,Dark=False)

#in windows 7 or older: (scroll down for image Acrylic True/False)
Win7Blur(HWND,Acrylic)

#in Linux (may not work for all distros, scroll down for image)
BlurLinux(HWND)

#in Mac (WIP):
MacBlur(QWidget,Material)

#NEW, Blur Windows Vista, 7, 8, 8.1, 10, 11, Linux, MacOS Auto
GlobalBlur(HWND,hexColor=False,Acrylic=False,Dark=False,QWidget=QWidget)

Example:

import sys
from PySide2.QtWidgets import *
from PySide2.QtCore import *

from BlurWindow.blurWindow import GlobalBlur


class MainWindow(QWidget):
    def __init__(self):
        super(MainWindow, self).__init__()
        self.setAttribute(Qt.WA_TranslucentBackground)
        self.resize(500, 400)

        GlobalBlur(self.winId(),Dark=True,QWidget=self)

        self.setStyleSheet("background-color: rgba(0, 0, 0, 0)")


if __name__ == '__main__':
    app = QApplication(sys.argv)
    mw = MainWindow()
    mw.show()
    sys.exit(app.exec_())

Windows 7/Vista:

https://i.imgur.com/CgFlbwt.png

Linux (Deepin):

https://i.imgur.com/h4TCByr.png

MacOS (BigSur):

https://i.imgur.com/qVSZnIw.png

This code needs to be completely revised and rewritten, it was done as quickly as possible

About

Windows 10 UWP Acrylic in PySide, Tkinter, etc

License:MIT License


Languages

Language:Python 100.0%