PyQt5-Frameless-Window 0.7.4__tar.gz → 0.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/PKG-INFO +1 -1
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/PyQt5_Frameless_Window.egg-info/PKG-INFO +1 -1
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/__init__.py +1 -1
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/linux/__init__.py +4 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/linux/window_effect.py +20 -1
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/mac/__init__.py +4 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/mac/window_effect.py +20 -1
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/windows/__init__.py +15 -1
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/windows/window_effect.py +24 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/setup.py +1 -1
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/LICENSE +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/PyQt5_Frameless_Window.egg-info/SOURCES.txt +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/PyQt5_Frameless_Window.egg-info/dependency_links.txt +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/PyQt5_Frameless_Window.egg-info/requires.txt +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/PyQt5_Frameless_Window.egg-info/top_level.txt +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/README.md +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/_rc/__init__.py +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/_rc/resource.py +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/titlebar/__init__.py +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/titlebar/title_bar_buttons.py +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/utils/__init__.py +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/utils/linux_utils.py +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/utils/mac_utils.py +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/utils/win32_utils.py +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/webengine/__init__.py +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/windows/c_structures.py +0 -0
- {pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/setup.cfg +0 -0
{pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/linux/__init__.py
RENAMED
|
@@ -33,6 +33,10 @@ class LinuxFramelessWindow(QWidget):
|
|
|
33
33
|
def updateFrameless(self):
|
|
34
34
|
self.setWindowFlags(self.windowFlags() | Qt.FramelessWindowHint)
|
|
35
35
|
|
|
36
|
+
def refreshBackgroundBlurEffect(self):
|
|
37
|
+
""" Refresh background blur effect """
|
|
38
|
+
pass
|
|
39
|
+
|
|
36
40
|
def setStayOnTop(self, isTop: bool):
|
|
37
41
|
""" set the stay on top status """
|
|
38
42
|
if isTop:
|
|
@@ -159,8 +159,27 @@ class LinuxWindowEffect:
|
|
|
159
159
|
|
|
160
160
|
def enableBlurBehindWindow(self, hWnd):
|
|
161
161
|
""" enable the blur effect behind the whole client
|
|
162
|
+
|
|
163
|
+
Parameters
|
|
164
|
+
----------
|
|
165
|
+
hWnd: int or `sip.voidptr`
|
|
166
|
+
Window handle
|
|
167
|
+
"""
|
|
168
|
+
|
|
169
|
+
def removeWindowAnimation(self, hWnd):
|
|
170
|
+
""" Disables maximize and minimize animation of the window by removing the relevant window styles.
|
|
171
|
+
|
|
162
172
|
Parameters
|
|
163
173
|
----------
|
|
164
174
|
hWnd: int or `sip.voidptr`
|
|
165
175
|
Window handle
|
|
166
|
-
"""
|
|
176
|
+
"""
|
|
177
|
+
|
|
178
|
+
def disableBlurBehindWindow(self, hWnd):
|
|
179
|
+
""" disable the blur effect behind the whole client
|
|
180
|
+
|
|
181
|
+
Parameters
|
|
182
|
+
----------
|
|
183
|
+
hWnd: int or `sip.voidptr`
|
|
184
|
+
Window handle
|
|
185
|
+
"""
|
{pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/mac/__init__.py
RENAMED
|
@@ -167,6 +167,10 @@ class MacFramelessWindow(QWidget):
|
|
|
167
167
|
"""
|
|
168
168
|
return QRect(0, 0, 75, size.height())
|
|
169
169
|
|
|
170
|
+
def refreshBackgroundBlurEffect(self):
|
|
171
|
+
""" Refresh background blur effect """
|
|
172
|
+
pass
|
|
173
|
+
|
|
170
174
|
|
|
171
175
|
class AcrylicWindow(MacFramelessWindow):
|
|
172
176
|
""" A frameless window with acrylic effect """
|
{pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/mac/window_effect.py
RENAMED
|
@@ -179,8 +179,27 @@ class MacWindowEffect:
|
|
|
179
179
|
|
|
180
180
|
def enableBlurBehindWindow(self, hWnd):
|
|
181
181
|
""" enable the blur effect behind the whole client
|
|
182
|
+
|
|
183
|
+
Parameters
|
|
184
|
+
----------
|
|
185
|
+
hWnd: int or `sip.voidptr`
|
|
186
|
+
Window handle
|
|
187
|
+
"""
|
|
188
|
+
|
|
189
|
+
def removeWindowAnimation(self, hWnd):
|
|
190
|
+
""" Disables maximize and minimize animation of the window by removing the relevant window styles.
|
|
191
|
+
|
|
182
192
|
Parameters
|
|
183
193
|
----------
|
|
184
194
|
hWnd: int or `sip.voidptr`
|
|
185
195
|
Window handle
|
|
186
|
-
"""
|
|
196
|
+
"""
|
|
197
|
+
|
|
198
|
+
def disableBlurBehindWindow(self, hWnd):
|
|
199
|
+
""" disable the blur effect behind the whole client
|
|
200
|
+
|
|
201
|
+
Parameters
|
|
202
|
+
----------
|
|
203
|
+
hWnd: int or `sip.voidptr`
|
|
204
|
+
Window handle
|
|
205
|
+
"""
|
{pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/windows/__init__.py
RENAMED
|
@@ -6,7 +6,7 @@ from ctypes.wintypes import LPRECT, MSG
|
|
|
6
6
|
import win32api
|
|
7
7
|
import win32con
|
|
8
8
|
import win32gui
|
|
9
|
-
from PyQt5.QtCore import Qt, QSize, QRect
|
|
9
|
+
from PyQt5.QtCore import Qt, QSize, QRect, QEvent
|
|
10
10
|
from PyQt5.QtGui import QCloseEvent, QCursor
|
|
11
11
|
from PyQt5.QtWidgets import QApplication, QWidget
|
|
12
12
|
|
|
@@ -53,6 +53,13 @@ class WindowsFramelessWindow(QWidget):
|
|
|
53
53
|
if not isinstance(self, AcrylicWindow):
|
|
54
54
|
self.windowEffect.addShadowEffect(self.winId())
|
|
55
55
|
|
|
56
|
+
def refreshBackgroundBlurEffect(self):
|
|
57
|
+
""" Refresh background blur effect """
|
|
58
|
+
self.windowEffect.disableBlurBehindWindow(self.winId())
|
|
59
|
+
self.windowEffect.removeWindowAnimation(self.winId())
|
|
60
|
+
self.windowEffect.enableBlurBehindWindow(self.winId())
|
|
61
|
+
self.windowEffect.addWindowAnimation(self.winId())
|
|
62
|
+
|
|
56
63
|
def setTitleBar(self, titleBar):
|
|
57
64
|
""" set custom title bar
|
|
58
65
|
|
|
@@ -235,6 +242,13 @@ class AcrylicWindow(WindowsFramelessWindow):
|
|
|
235
242
|
|
|
236
243
|
return super().nativeEvent(eventType, message)
|
|
237
244
|
|
|
245
|
+
def event(self, e: QEvent):
|
|
246
|
+
if e.type() == QEvent.Type.WindowStateChange:
|
|
247
|
+
if win_utils.isMaximized(self.winId()):
|
|
248
|
+
self.refreshBackgroundBlurEffect()
|
|
249
|
+
|
|
250
|
+
return super().event(e)
|
|
251
|
+
|
|
238
252
|
def closeEvent(self, e):
|
|
239
253
|
if not self.__closedByKey or QApplication.quitOnLastWindowClosed():
|
|
240
254
|
self.__closedByKey = False
|
|
@@ -298,3 +298,27 @@ class WindowsWindowEffect:
|
|
|
298
298
|
"""
|
|
299
299
|
blurBehind = DWM_BLURBEHIND(1, True, 0, False)
|
|
300
300
|
self.DwmEnableBlurBehindWindow(int(hWnd), byref(blurBehind))
|
|
301
|
+
|
|
302
|
+
def removeWindowAnimation(self, hWnd):
|
|
303
|
+
""" Disables maximize and minimize animation of the window by removing the relevant window styles. """
|
|
304
|
+
hWnd = int(hWnd)
|
|
305
|
+
style = win32gui.GetWindowLong(hWnd, win32con.GWL_STYLE)
|
|
306
|
+
style &= ~win32con.WS_MINIMIZEBOX
|
|
307
|
+
style &= ~win32con.WS_MAXIMIZEBOX
|
|
308
|
+
style &= ~win32con.WS_CAPTION
|
|
309
|
+
style &= ~win32con.WS_THICKFRAME
|
|
310
|
+
win32gui.SetWindowLong(hWnd, win32con.GWL_STYLE, style)
|
|
311
|
+
win32gui.SetWindowPos(hWnd, None, 0, 0, 0, 0,
|
|
312
|
+
win32con.SWP_NOMOVE | win32con.SWP_NOSIZE | win32con.SWP_NOZORDER |
|
|
313
|
+
win32con.SWP_FRAMECHANGED)
|
|
314
|
+
|
|
315
|
+
def disableBlurBehindWindow(self, hWnd):
|
|
316
|
+
""" disable the blur effect behind the whole client
|
|
317
|
+
|
|
318
|
+
Parameters
|
|
319
|
+
----------
|
|
320
|
+
hWnd: int or `sip.voidptr`
|
|
321
|
+
Window handle
|
|
322
|
+
"""
|
|
323
|
+
blurBehind = DWM_BLURBEHIND(1, False, 0, False)
|
|
324
|
+
self.DwmEnableBlurBehindWindow(int(hWnd), byref(blurBehind))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/_rc/__init__.py
RENAMED
|
File without changes
|
{pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/_rc/resource.py
RENAMED
|
File without changes
|
{pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/titlebar/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/utils/__init__.py
RENAMED
|
File without changes
|
{pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/utils/linux_utils.py
RENAMED
|
File without changes
|
{pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/utils/mac_utils.py
RENAMED
|
File without changes
|
{pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/utils/win32_utils.py
RENAMED
|
File without changes
|
{pyqt5_frameless_window-0.7.4 → pyqt5_frameless_window-0.8.0}/qframelesswindow/webengine/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|