Skip to content

Commit 5765ce0

Browse files
committed
更新到 v0.8.0
1 parent a38540d commit 5765ce0

5 files changed

Lines changed: 55 additions & 8 deletions

File tree

qframelesswindow/linux/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def resizeEvent(self, e):
3333
def updateFrameless(self):
3434
self.setWindowFlags(self.windowFlags() | Qt.FramelessWindowHint)
3535

36+
def refreshBackgroundBlurEffect(self):
37+
""" Refresh background blur effect """
38+
pass
39+
3640
def setStayOnTop(self, isTop: bool):
3741
""" set the stay on top status """
3842
if isTop:

qframelesswindow/linux/window_effect.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,27 @@ def disableMaximizeButton(hWnd):
159159

160160
def enableBlurBehindWindow(self, hWnd):
161161
""" 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+
162172
Parameters
163173
----------
164174
hWnd: int or `sip.voidptr`
165175
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+
"""

qframelesswindow/mac/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ def systemTitleBarRect(self, size: QSize) -> QRect:
167167
"""
168168
return QRect(0, 0, 75, size.height())
169169

170+
def refreshBackgroundBlurEffect(self):
171+
""" Refresh background blur effect """
172+
pass
173+
170174

171175
class AcrylicWindow(MacFramelessWindow):
172176
""" A frameless window with acrylic effect """

qframelesswindow/mac/window_effect.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,27 @@ def disableMaximizeButton(hWnd):
179179

180180
def enableBlurBehindWindow(self, hWnd):
181181
""" 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+
182192
Parameters
183193
----------
184194
hWnd: int or `sip.voidptr`
185195
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+
"""

qframelesswindow/windows/__init__.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ def updateFrameless(self):
5353
if not isinstance(self, AcrylicWindow):
5454
self.windowEffect.addShadowEffect(self.winId())
5555

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+
5663
def setTitleBar(self, titleBar):
5764
""" set custom title bar
5865
@@ -222,12 +229,6 @@ def updateFrameless(self):
222229
if win_utils.isGreaterEqualWin11():
223230
self.windowEffect.addShadowEffect(self.winId())
224231

225-
def refreshBackgroundBlurEffect(self):
226-
self.windowEffect.disableBlurBehindWindow(self.winId())
227-
self.windowEffect.removeWindowAnimation(self.winId())
228-
self.windowEffect.enableBlurBehindWindow(self.winId())
229-
self.windowEffect.addWindowAnimation(self.winId())
230-
231232
def nativeEvent(self, eventType, message):
232233
""" Handle the Windows message """
233234
msg = MSG.from_address(message.__int__())

0 commit comments

Comments
 (0)