PySide2-Frameless-Window 0.4.2__tar.gz → 0.4.3__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.2 → PySide2-Frameless-Window-0.4.3}/PKG-INFO +1 -1
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/PySide2_Frameless_Window.egg-info/PKG-INFO +1 -1
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/__init__.py +1 -1
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/utils/__init__.py +3 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/utils/linux_utils.py +12 -1
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/utils/mac_utils.py +17 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/utils/win32_utils.py +25 -2
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/setup.py +1 -1
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/LICENSE +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/PySide2_Frameless_Window.egg-info/SOURCES.txt +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/PySide2_Frameless_Window.egg-info/dependency_links.txt +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/PySide2_Frameless_Window.egg-info/requires.txt +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/PySide2_Frameless_Window.egg-info/top_level.txt +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/README.md +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/_rc/__init__.py +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/_rc/resource.py +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/linux/__init__.py +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/linux/window_effect.py +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/mac/__init__.py +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/mac/window_effect.py +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/titlebar/__init__.py +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/titlebar/title_bar_buttons.py +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/webengine/__init__.py +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/windows/__init__.py +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/windows/c_structures.py +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/windows/window_effect.py +0 -0
- {PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PySide2-Frameless-Window
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PySide2-Frameless-Window
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
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
|
{PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/utils/__init__.py
RENAMED
|
@@ -3,10 +3,13 @@ import sys
|
|
|
3
3
|
|
|
4
4
|
if sys.platform == "win32":
|
|
5
5
|
from .win32_utils import WindowsMoveResize as MoveResize
|
|
6
|
+
from .win32_utils import getSystemAccentColor
|
|
6
7
|
elif sys.platform == "darwin":
|
|
7
8
|
from .mac_utils import MacMoveResize as MoveResize
|
|
9
|
+
from .mac_utils import getSystemAccentColor
|
|
8
10
|
else:
|
|
9
11
|
from .linux_utils import LinuxMoveResize as MoveResize
|
|
12
|
+
from .linux_utils import getSystemAccentColor
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
def startSystemMove(window, globalPos):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
from PySide2.QtCore import QEvent, QPoint, Qt
|
|
3
|
-
from PySide2.QtGui import QMouseEvent
|
|
3
|
+
from PySide2.QtGui import QMouseEvent, QColor
|
|
4
4
|
from PySide2.QtWidgets import QApplication
|
|
5
5
|
|
|
6
6
|
|
|
@@ -43,3 +43,14 @@ class LinuxMoveResize:
|
|
|
43
43
|
return
|
|
44
44
|
|
|
45
45
|
window.windowHandle().startSystemResize(edges)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def getSystemAccentColor():
|
|
49
|
+
""" get the accent color of system
|
|
50
|
+
|
|
51
|
+
Returns
|
|
52
|
+
-------
|
|
53
|
+
color: QColor
|
|
54
|
+
accent color
|
|
55
|
+
"""
|
|
56
|
+
return QColor()
|
|
@@ -4,6 +4,7 @@ from ctypes import c_void_p
|
|
|
4
4
|
import Cocoa
|
|
5
5
|
import objc
|
|
6
6
|
from PySide2.QtCore import qVersion
|
|
7
|
+
from PySide2.QtGui import QColor
|
|
7
8
|
from PySide2.QtWidgets import QWidget
|
|
8
9
|
from Quartz.CoreGraphics import (CGEventCreateMouseEvent,
|
|
9
10
|
kCGEventLeftMouseDown, kCGMouseButtonLeft)
|
|
@@ -70,3 +71,19 @@ def getNSWindow(winId):
|
|
|
70
71
|
"""
|
|
71
72
|
view = objc.objc_object(c_void_p=c_void_p(int(winId)))
|
|
72
73
|
return view.window()
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def getSystemAccentColor():
|
|
77
|
+
""" get the accent color of system
|
|
78
|
+
|
|
79
|
+
Returns
|
|
80
|
+
-------
|
|
81
|
+
color: QColor
|
|
82
|
+
accent color
|
|
83
|
+
"""
|
|
84
|
+
color = Cocoa.NSColor.controlAccentColor()
|
|
85
|
+
color = color.colorUsingColorSpace_(Cocoa.NSColorSpace.sRGBColorSpace())
|
|
86
|
+
r = int(color.redComponent() * 255)
|
|
87
|
+
g = int(color.greenComponent() * 255)
|
|
88
|
+
b = int(color.blueComponent() * 255)
|
|
89
|
+
return QColor(r, g, b)
|
|
@@ -1,19 +1,42 @@
|
|
|
1
1
|
# coding:utf-8
|
|
2
|
-
from ctypes import Structure, byref, sizeof, windll
|
|
2
|
+
from ctypes import Structure, byref, sizeof, windll, c_ulong, c_bool, POINTER
|
|
3
3
|
from ctypes.wintypes import DWORD, HWND, LPARAM, RECT, UINT
|
|
4
4
|
from platform import platform
|
|
5
5
|
import sys
|
|
6
|
+
import warnings
|
|
6
7
|
|
|
7
8
|
import win32api
|
|
8
9
|
import win32con
|
|
9
10
|
import win32gui
|
|
10
11
|
import win32print
|
|
11
12
|
from PySide2.QtCore import QOperatingSystemVersion, QVersionNumber
|
|
12
|
-
from PySide2.QtGui import QGuiApplication
|
|
13
|
+
from PySide2.QtGui import QGuiApplication, QColor
|
|
13
14
|
from PySide2.QtWinExtras import QtWin
|
|
14
15
|
from win32comext.shell import shellcon
|
|
15
16
|
|
|
16
17
|
|
|
18
|
+
def getSystemAccentColor():
|
|
19
|
+
""" get the accent color of system
|
|
20
|
+
|
|
21
|
+
Returns
|
|
22
|
+
-------
|
|
23
|
+
color: QColor
|
|
24
|
+
accent color
|
|
25
|
+
"""
|
|
26
|
+
DwmGetColorizationColor = windll.dwmapi.DwmGetColorizationColor
|
|
27
|
+
DwmGetColorizationColor.restype = c_ulong
|
|
28
|
+
DwmGetColorizationColor.argtypes = [POINTER(c_ulong), POINTER(c_bool)]
|
|
29
|
+
|
|
30
|
+
color = c_ulong()
|
|
31
|
+
code = DwmGetColorizationColor(byref(color), byref(c_bool()))
|
|
32
|
+
|
|
33
|
+
if code != 0:
|
|
34
|
+
warnings.warn("Unable to obtain system accent color.")
|
|
35
|
+
return QColor()
|
|
36
|
+
|
|
37
|
+
return QColor(color.value)
|
|
38
|
+
|
|
39
|
+
|
|
17
40
|
def isMaximized(hWnd):
|
|
18
41
|
""" Determine whether the window is maximized
|
|
19
42
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/_rc/__init__.py
RENAMED
|
File without changes
|
{PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/_rc/resource.py
RENAMED
|
File without changes
|
{PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/linux/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{PySide2-Frameless-Window-0.4.2 → PySide2-Frameless-Window-0.4.3}/qframelesswindow/mac/__init__.py
RENAMED
|
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
|