PySideSix-Frameless-Window 0.7.7__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.
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/PKG-INFO +1 -1
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/PySideSix_Frameless_Window.egg-info/PKG-INFO +1 -1
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/__init__.py +1 -1
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/linux/__init__.py +4 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/linux/window_effect.py +20 -1
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/mac/__init__.py +4 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/mac/window_effect.py +20 -1
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/windows/__init__.py +15 -1
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/windows/window_effect.py +24 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/setup.py +1 -1
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/LICENSE +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/PySideSix_Frameless_Window.egg-info/SOURCES.txt +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/PySideSix_Frameless_Window.egg-info/dependency_links.txt +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/PySideSix_Frameless_Window.egg-info/requires.txt +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/PySideSix_Frameless_Window.egg-info/top_level.txt +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/README.md +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/_rc/__init__.py +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/_rc/resource.py +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/titlebar/__init__.py +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/titlebar/title_bar_buttons.py +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/utils/__init__.py +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/utils/linux_utils.py +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/utils/mac_utils.py +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/utils/win32_utils.py +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/webengine/__init__.py +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/qframelesswindow/windows/c_structures.py +0 -0
- {pysidesix_frameless_window-0.7.7 → pysidesix_frameless_window-0.8.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PySideSix-Frameless-Window
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: A cross-platform frameless window based on pyside6, support Win32, Linux and macOS.
|
|
5
5
|
Home-page: https://github.com/zhiyiYo/PyQt-Frameless-Window/tree/PySide6
|
|
6
6
|
Author: zhiyiYo
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PySideSix-Frameless-Window
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: A cross-platform frameless window based on pyside6, support Win32, Linux and macOS.
|
|
5
5
|
Home-page: https://github.com/zhiyiYo/PyQt-Frameless-Window/tree/PySide6
|
|
6
6
|
Author: zhiyiYo
|
|
@@ -33,6 +33,10 @@ class LinuxFramelessWindowBase:
|
|
|
33
33
|
def resizeEvent(self, e):
|
|
34
34
|
self.titleBar.resize(self.width(), self.titleBar.height())
|
|
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:
|
|
@@ -160,9 +160,28 @@ class LinuxWindowEffect:
|
|
|
160
160
|
|
|
161
161
|
def enableBlurBehindWindow(self, hWnd):
|
|
162
162
|
""" enable the blur effect behind the whole client
|
|
163
|
+
|
|
164
|
+
Parameters
|
|
165
|
+
----------
|
|
166
|
+
hWnd: int or `sip.voidptr`
|
|
167
|
+
Window handle
|
|
168
|
+
"""
|
|
169
|
+
|
|
170
|
+
def removeWindowAnimation(self, hWnd):
|
|
171
|
+
""" Disables maximize and minimize animation of the window by removing the relevant window styles.
|
|
172
|
+
|
|
163
173
|
Parameters
|
|
164
174
|
----------
|
|
165
175
|
hWnd: int or `sip.voidptr`
|
|
166
176
|
Window handle
|
|
167
177
|
"""
|
|
168
|
-
|
|
178
|
+
|
|
179
|
+
def disableBlurBehindWindow(self, hWnd):
|
|
180
|
+
""" disable the blur effect behind the whole client
|
|
181
|
+
|
|
182
|
+
Parameters
|
|
183
|
+
----------
|
|
184
|
+
hWnd: int or `sip.voidptr`
|
|
185
|
+
Window handle
|
|
186
|
+
"""
|
|
187
|
+
pass
|
|
@@ -181,6 +181,10 @@ class MacFramelessWindowBase:
|
|
|
181
181
|
"""
|
|
182
182
|
return QRect(0, 0, 75, size.height())
|
|
183
183
|
|
|
184
|
+
def refreshBackgroundBlurEffect(self):
|
|
185
|
+
""" Refresh background blur effect """
|
|
186
|
+
pass
|
|
187
|
+
|
|
184
188
|
|
|
185
189
|
class MacFramelessWindow(QWidget, MacFramelessWindowBase):
|
|
186
190
|
""" Frameless window for Linux system """
|
|
@@ -189,9 +189,28 @@ class MacWindowEffect:
|
|
|
189
189
|
|
|
190
190
|
def enableBlurBehindWindow(self, hWnd):
|
|
191
191
|
""" enable the blur effect behind the whole client
|
|
192
|
+
|
|
193
|
+
Parameters
|
|
194
|
+
----------
|
|
195
|
+
hWnd: int or `sip.voidptr`
|
|
196
|
+
Window handle
|
|
197
|
+
"""
|
|
198
|
+
|
|
199
|
+
def removeWindowAnimation(self, hWnd):
|
|
200
|
+
""" Disables maximize and minimize animation of the window by removing the relevant window styles.
|
|
201
|
+
|
|
192
202
|
Parameters
|
|
193
203
|
----------
|
|
194
204
|
hWnd: int or `sip.voidptr`
|
|
195
205
|
Window handle
|
|
196
206
|
"""
|
|
197
|
-
|
|
207
|
+
|
|
208
|
+
def disableBlurBehindWindow(self, hWnd):
|
|
209
|
+
""" disable the blur effect behind the whole client
|
|
210
|
+
|
|
211
|
+
Parameters
|
|
212
|
+
----------
|
|
213
|
+
hWnd: int or `sip.voidptr`
|
|
214
|
+
Window handle
|
|
215
|
+
"""
|
|
216
|
+
pass
|
|
@@ -5,7 +5,7 @@ from ctypes.wintypes import LPRECT, MSG
|
|
|
5
5
|
import win32con
|
|
6
6
|
import win32gui
|
|
7
7
|
import win32api
|
|
8
|
-
from PySide6.QtCore import Qt, QSize, QRect
|
|
8
|
+
from PySide6.QtCore import Qt, QSize, QRect, QEvent
|
|
9
9
|
from PySide6.QtGui import QCloseEvent, QCursor
|
|
10
10
|
from PySide6.QtWidgets import QApplication, QDialog, QWidget, QMainWindow
|
|
11
11
|
|
|
@@ -48,6 +48,13 @@ class WindowsFramelessWindowBase:
|
|
|
48
48
|
if not isinstance(self, AcrylicWindow):
|
|
49
49
|
self.windowEffect.addShadowEffect(self.winId())
|
|
50
50
|
|
|
51
|
+
def refreshBackgroundBlurEffect(self):
|
|
52
|
+
""" Refresh background blur effect """
|
|
53
|
+
self.windowEffect.disableBlurBehindWindow(self.winId())
|
|
54
|
+
self.windowEffect.removeWindowAnimation(self.winId())
|
|
55
|
+
self.windowEffect.enableBlurBehindWindow(self.winId())
|
|
56
|
+
self.windowEffect.addWindowAnimation(self.winId())
|
|
57
|
+
|
|
51
58
|
def setTitleBar(self, titleBar):
|
|
52
59
|
""" set custom title bar
|
|
53
60
|
|
|
@@ -236,6 +243,13 @@ class AcrylicWindow(WindowsFramelessWindow):
|
|
|
236
243
|
|
|
237
244
|
return super().nativeEvent(eventType, message)
|
|
238
245
|
|
|
246
|
+
def event(self, e: QEvent):
|
|
247
|
+
if e.type() == QEvent.Type.WindowStateChange:
|
|
248
|
+
if win_utils.isMaximized(self.winId()):
|
|
249
|
+
self.refreshBackgroundBlurEffect()
|
|
250
|
+
|
|
251
|
+
return super().event(e)
|
|
252
|
+
|
|
239
253
|
def closeEvent(self, e):
|
|
240
254
|
if not self.__closedByKey or QApplication.quitOnLastWindowClosed():
|
|
241
255
|
self.__closedByKey = False
|
|
@@ -313,3 +313,27 @@ class WindowsWindowEffect:
|
|
|
313
313
|
"""
|
|
314
314
|
blurBehind = DWM_BLURBEHIND(1, True, 0, False)
|
|
315
315
|
self.DwmEnableBlurBehindWindow(int(hWnd), byref(blurBehind))
|
|
316
|
+
|
|
317
|
+
def removeWindowAnimation(self, hWnd):
|
|
318
|
+
""" Disables maximize and minimize animation of the window by removing the relevant window styles. """
|
|
319
|
+
hWnd = int(hWnd)
|
|
320
|
+
style = win32gui.GetWindowLong(hWnd, win32con.GWL_STYLE)
|
|
321
|
+
style &= ~win32con.WS_MINIMIZEBOX
|
|
322
|
+
style &= ~win32con.WS_MAXIMIZEBOX
|
|
323
|
+
style &= ~win32con.WS_CAPTION
|
|
324
|
+
style &= ~win32con.WS_THICKFRAME
|
|
325
|
+
win32gui.SetWindowLong(hWnd, win32con.GWL_STYLE, style)
|
|
326
|
+
win32gui.SetWindowPos(hWnd, None, 0, 0, 0, 0,
|
|
327
|
+
win32con.SWP_NOMOVE | win32con.SWP_NOSIZE | win32con.SWP_NOZORDER |
|
|
328
|
+
win32con.SWP_FRAMECHANGED)
|
|
329
|
+
|
|
330
|
+
def disableBlurBehindWindow(self, hWnd):
|
|
331
|
+
""" disable the blur effect behind the whole client
|
|
332
|
+
|
|
333
|
+
Parameters
|
|
334
|
+
----------
|
|
335
|
+
hWnd: int or `sip.voidptr`
|
|
336
|
+
Window handle
|
|
337
|
+
"""
|
|
338
|
+
blurBehind = DWM_BLURBEHIND(1, False, 0, False)
|
|
339
|
+
self.DwmEnableBlurBehindWindow(int(hWnd), byref(blurBehind))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|