PySide2-Frameless-Window 0.4.3__tar.gz → 0.5.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.
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/PKG-INFO +2 -3
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/PySide2_Frameless_Window.egg-info/PKG-INFO +2 -3
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/README.md +1 -2
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/__init__.py +1 -1
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/linux/__init__.py +17 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/mac/__init__.py +18 -1
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/utils/win32_utils.py +2 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/windows/__init__.py +25 -4
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/setup.py +1 -1
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/LICENSE +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/PySide2_Frameless_Window.egg-info/SOURCES.txt +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/PySide2_Frameless_Window.egg-info/dependency_links.txt +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/PySide2_Frameless_Window.egg-info/requires.txt +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/PySide2_Frameless_Window.egg-info/top_level.txt +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/_rc/__init__.py +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/_rc/resource.py +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/linux/window_effect.py +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/mac/window_effect.py +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/titlebar/__init__.py +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/titlebar/title_bar_buttons.py +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/utils/__init__.py +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/utils/linux_utils.py +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/utils/mac_utils.py +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/webengine/__init__.py +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/windows/c_structures.py +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/windows/window_effect.py +0 -0
- {PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PySide2-Frameless-Window
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: A cross-platform frameless window based on pyside2, support Win32, Linux and macOS.
|
|
5
5
|
Home-page: https://github.com/zhiyiYo/PyQt-Frameless-Window/tree/Pyside2
|
|
6
6
|
Author: zhiyiYo
|
|
@@ -123,10 +123,9 @@ Want to know more about PySide2-Frameless-Window? Please read the [help document
|
|
|
123
123
|
|
|
124
124
|
## See Also
|
|
125
125
|
Here are some projects that use PyQt-Frameless-Window:
|
|
126
|
+
* [**zhiyiYo/QFluentWidgets**: A fluent design widgets library based on Qt](https://qfluentwidgets.com)
|
|
126
127
|
* [**zhiyiYo/Groove**: A cross-platform music player based on PyQt5](https://github.com/zhiyiYo/Groove)
|
|
127
128
|
* [**zhiyiYo/Alpha-Gobang-Zero**: A gobang robot based on reinforcement learning](https://github.com/zhiyiYo/Alpha-Gobang-Zero)
|
|
128
|
-
* [**zhiyiYo/PyQt-Fluent-Widgets**: A fluent design widgets library based on Qt](https://github.com/zhiyiYo/PyQt-Fluent-Widgets)
|
|
129
|
-
* [**zhiyiYo/QMaterialWidgets**: A material design widgets library based on Qt](https://qmaterialwidgets.vercel.app)
|
|
130
129
|
|
|
131
130
|
## Reference
|
|
132
131
|
* [**wangwenx190/framelesshelper**: Frameless windows for Qt Widgets and Qt Quick applications. Support Win32, X11, Wayland and macOS](https://github.com/wangwenx190/framelesshelper)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PySide2-Frameless-Window
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: A cross-platform frameless window based on pyside2, support Win32, Linux and macOS.
|
|
5
5
|
Home-page: https://github.com/zhiyiYo/PyQt-Frameless-Window/tree/Pyside2
|
|
6
6
|
Author: zhiyiYo
|
|
@@ -123,10 +123,9 @@ Want to know more about PySide2-Frameless-Window? Please read the [help document
|
|
|
123
123
|
|
|
124
124
|
## See Also
|
|
125
125
|
Here are some projects that use PyQt-Frameless-Window:
|
|
126
|
+
* [**zhiyiYo/QFluentWidgets**: A fluent design widgets library based on Qt](https://qfluentwidgets.com)
|
|
126
127
|
* [**zhiyiYo/Groove**: A cross-platform music player based on PyQt5](https://github.com/zhiyiYo/Groove)
|
|
127
128
|
* [**zhiyiYo/Alpha-Gobang-Zero**: A gobang robot based on reinforcement learning](https://github.com/zhiyiYo/Alpha-Gobang-Zero)
|
|
128
|
-
* [**zhiyiYo/PyQt-Fluent-Widgets**: A fluent design widgets library based on Qt](https://github.com/zhiyiYo/PyQt-Fluent-Widgets)
|
|
129
|
-
* [**zhiyiYo/QMaterialWidgets**: A material design widgets library based on Qt](https://qmaterialwidgets.vercel.app)
|
|
130
129
|
|
|
131
130
|
## Reference
|
|
132
131
|
* [**wangwenx190/framelesshelper**: Frameless windows for Qt Widgets and Qt Quick applications. Support Win32, X11, Wayland and macOS](https://github.com/wangwenx190/framelesshelper)
|
|
@@ -105,10 +105,9 @@ Want to know more about PySide2-Frameless-Window? Please read the [help document
|
|
|
105
105
|
|
|
106
106
|
## See Also
|
|
107
107
|
Here are some projects that use PyQt-Frameless-Window:
|
|
108
|
+
* [**zhiyiYo/QFluentWidgets**: A fluent design widgets library based on Qt](https://qfluentwidgets.com)
|
|
108
109
|
* [**zhiyiYo/Groove**: A cross-platform music player based on PyQt5](https://github.com/zhiyiYo/Groove)
|
|
109
110
|
* [**zhiyiYo/Alpha-Gobang-Zero**: A gobang robot based on reinforcement learning](https://github.com/zhiyiYo/Alpha-Gobang-Zero)
|
|
110
|
-
* [**zhiyiYo/PyQt-Fluent-Widgets**: A fluent design widgets library based on Qt](https://github.com/zhiyiYo/PyQt-Fluent-Widgets)
|
|
111
|
-
* [**zhiyiYo/QMaterialWidgets**: A material design widgets library based on Qt](https://qmaterialwidgets.vercel.app)
|
|
112
111
|
|
|
113
112
|
## Reference
|
|
114
113
|
* [**wangwenx190/framelesshelper**: Frameless windows for Qt Widgets and Qt Quick applications. Support Win32, X11, Wayland and macOS](https://github.com/wangwenx190/framelesshelper)
|
{PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/linux/__init__.py
RENAMED
|
@@ -34,6 +34,23 @@ class LinuxFramelessWindow(QWidget):
|
|
|
34
34
|
super().resizeEvent(e)
|
|
35
35
|
self.titleBar.resize(self.width(), self.titleBar.height())
|
|
36
36
|
|
|
37
|
+
def setStayOnTop(self, isTop: bool):
|
|
38
|
+
""" set the stay on top status """
|
|
39
|
+
if isTop:
|
|
40
|
+
self.setWindowFlags(self.windowFlags() | Qt.WindowStaysOnTopHint)
|
|
41
|
+
else:
|
|
42
|
+
self.setWindowFlags(self.windowFlags() & ~Qt.WindowStaysOnTopHint)
|
|
43
|
+
|
|
44
|
+
self.updateFrameless()
|
|
45
|
+
self.show()
|
|
46
|
+
|
|
47
|
+
def toggleStayOnTop(self):
|
|
48
|
+
""" toggle the stay on top status """
|
|
49
|
+
if self.windowFlags() & Qt.WindowStaysOnTopHint:
|
|
50
|
+
self.setStayOnTop(False)
|
|
51
|
+
else:
|
|
52
|
+
self.setStayOnTop(True)
|
|
53
|
+
|
|
37
54
|
def setTitleBar(self, titleBar):
|
|
38
55
|
""" set custom title bar
|
|
39
56
|
|
{PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/mac/__init__.py
RENAMED
|
@@ -34,7 +34,24 @@ class MacFramelessWindow(QWidget):
|
|
|
34
34
|
self.__nsWindow = view.window()
|
|
35
35
|
|
|
36
36
|
# hide system title bar
|
|
37
|
-
self._hideSystemTitleBar()
|
|
37
|
+
self._hideSystemTitleBar(self.isSystemButtonVisible())
|
|
38
|
+
|
|
39
|
+
def setStayOnTop(self, isTop: bool):
|
|
40
|
+
""" set the stay on top status """
|
|
41
|
+
if isTop:
|
|
42
|
+
self.setWindowFlags(self.windowFlags() | Qt.WindowStaysOnTopHint)
|
|
43
|
+
else:
|
|
44
|
+
self.setWindowFlags(self.windowFlags() & ~Qt.WindowStaysOnTopHint)
|
|
45
|
+
|
|
46
|
+
self.updateFrameless()
|
|
47
|
+
self.show()
|
|
48
|
+
|
|
49
|
+
def toggleStayOnTop(self):
|
|
50
|
+
""" toggle the stay on top status """
|
|
51
|
+
if self.windowFlags() & Qt.WindowStaysOnTopHint:
|
|
52
|
+
self.setStayOnTop(False)
|
|
53
|
+
else:
|
|
54
|
+
self.setStayOnTop(True)
|
|
38
55
|
|
|
39
56
|
def setTitleBar(self, titleBar):
|
|
40
57
|
""" set custom title bar
|
|
@@ -140,6 +140,8 @@ def getDpiForWindow(hWnd, horizontal=True):
|
|
|
140
140
|
whether to use dpi scale
|
|
141
141
|
"""
|
|
142
142
|
if hasattr(windll.user32, 'GetDpiForWindow'):
|
|
143
|
+
windll.user32.GetDpiForWindow.argtypes = [HWND]
|
|
144
|
+
windll.user32.GetDpiForWindow.restype = UINT
|
|
143
145
|
return windll.user32.GetDpiForWindow(hWnd)
|
|
144
146
|
|
|
145
147
|
hdc = win32gui.GetDC(hWnd)
|
|
@@ -43,12 +43,14 @@ class WindowsFramelessWindow(QWidget):
|
|
|
43
43
|
def updateFrameless(self):
|
|
44
44
|
""" update frameless window """
|
|
45
45
|
# remove window border
|
|
46
|
+
stayOnTop = Qt.WindowStaysOnTopHint if self.windowFlags() & Qt.WindowStaysOnTopHint else 0
|
|
47
|
+
|
|
46
48
|
if not win_utils.isWin7():
|
|
47
49
|
self.setWindowFlags(self.windowFlags() | Qt.FramelessWindowHint)
|
|
48
50
|
elif self.parent():
|
|
49
|
-
self.setWindowFlags(self.parent().windowFlags() | Qt.FramelessWindowHint | Qt.WindowMinMaxButtonsHint)
|
|
51
|
+
self.setWindowFlags(self.parent().windowFlags() | Qt.FramelessWindowHint | Qt.WindowMinMaxButtonsHint | stayOnTop)
|
|
50
52
|
else:
|
|
51
|
-
self.setWindowFlags(Qt.FramelessWindowHint | Qt.WindowMinMaxButtonsHint)
|
|
53
|
+
self.setWindowFlags(Qt.FramelessWindowHint | Qt.WindowMinMaxButtonsHint | stayOnTop)
|
|
52
54
|
|
|
53
55
|
# add DWM shadow and window animation
|
|
54
56
|
self.windowEffect.addWindowAnimation(self.winId())
|
|
@@ -73,6 +75,23 @@ class WindowsFramelessWindow(QWidget):
|
|
|
73
75
|
""" set whether resizing is enabled """
|
|
74
76
|
self._isResizeEnabled = isEnabled
|
|
75
77
|
|
|
78
|
+
def setStayOnTop(self, isTop: bool):
|
|
79
|
+
""" set the stay on top status """
|
|
80
|
+
if isTop:
|
|
81
|
+
self.setWindowFlags(self.windowFlags() | Qt.WindowStaysOnTopHint)
|
|
82
|
+
else:
|
|
83
|
+
self.setWindowFlags(self.windowFlags() & ~Qt.WindowStaysOnTopHint)
|
|
84
|
+
|
|
85
|
+
self.updateFrameless()
|
|
86
|
+
self.show()
|
|
87
|
+
|
|
88
|
+
def toggleStayOnTop(self):
|
|
89
|
+
""" toggle the stay on top status """
|
|
90
|
+
if self.windowFlags() & Qt.WindowStaysOnTopHint:
|
|
91
|
+
self.setStayOnTop(False)
|
|
92
|
+
else:
|
|
93
|
+
self.setStayOnTop(True)
|
|
94
|
+
|
|
76
95
|
def resizeEvent(self, e):
|
|
77
96
|
super().resizeEvent(e)
|
|
78
97
|
self.titleBar.resize(self.width(), self.titleBar.height())
|
|
@@ -188,10 +207,12 @@ class AcrylicWindow(WindowsFramelessWindow):
|
|
|
188
207
|
super().updateFrameless()
|
|
189
208
|
QtWin.enableBlurBehindWindow(self)
|
|
190
209
|
|
|
210
|
+
stayOnTop = Qt.WindowStaysOnTopHint if self.windowFlags() & Qt.WindowStaysOnTopHint else 0
|
|
211
|
+
|
|
191
212
|
if win_utils.isWin7() and self.parent():
|
|
192
|
-
self.setWindowFlags(self.parent().windowFlags() | Qt.FramelessWindowHint | Qt.WindowMinMaxButtonsHint)
|
|
213
|
+
self.setWindowFlags(self.parent().windowFlags() | Qt.FramelessWindowHint | Qt.WindowMinMaxButtonsHint | stayOnTop)
|
|
193
214
|
else:
|
|
194
|
-
self.setWindowFlags(Qt.FramelessWindowHint | Qt.WindowMinMaxButtonsHint)
|
|
215
|
+
self.setWindowFlags(Qt.FramelessWindowHint | Qt.WindowMinMaxButtonsHint | stayOnTop)
|
|
195
216
|
|
|
196
217
|
self.windowEffect.addWindowAnimation(self.winId())
|
|
197
218
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/_rc/__init__.py
RENAMED
|
File without changes
|
{PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/_rc/resource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PySide2-Frameless-Window-0.4.3 → pyside2_frameless_window-0.5.0}/qframelesswindow/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|