pyloid 0.17.2__tar.gz → 0.17.3__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {pyloid-0.17.2 → pyloid-0.17.3}/PKG-INFO +1 -1
- {pyloid-0.17.2 → pyloid-0.17.3}/pyproject.toml +1 -1
- {pyloid-0.17.2 → pyloid-0.17.3}/src/pyloid/browser_window.py +52 -22
- {pyloid-0.17.2 → pyloid-0.17.3}/LICENSE +0 -0
- {pyloid-0.17.2 → pyloid-0.17.3}/README.md +0 -0
- {pyloid-0.17.2 → pyloid-0.17.3}/src/pyloid/__init__.py +0 -0
- {pyloid-0.17.2 → pyloid-0.17.3}/src/pyloid/api.py +0 -0
- {pyloid-0.17.2 → pyloid-0.17.3}/src/pyloid/autostart.py +0 -0
- {pyloid-0.17.2 → pyloid-0.17.3}/src/pyloid/custom/titlebar.py +0 -0
- {pyloid-0.17.2 → pyloid-0.17.3}/src/pyloid/filewatcher.py +0 -0
- {pyloid-0.17.2 → pyloid-0.17.3}/src/pyloid/js_api/event_api.py +0 -0
- {pyloid-0.17.2 → pyloid-0.17.3}/src/pyloid/js_api/window_api.py +0 -0
- {pyloid-0.17.2 → pyloid-0.17.3}/src/pyloid/monitor.py +0 -0
- {pyloid-0.17.2 → pyloid-0.17.3}/src/pyloid/pyloid.py +0 -0
- {pyloid-0.17.2 → pyloid-0.17.3}/src/pyloid/thread_pool.py +0 -0
- {pyloid-0.17.2 → pyloid-0.17.3}/src/pyloid/timer.py +0 -0
- {pyloid-0.17.2 → pyloid-0.17.3}/src/pyloid/tray.py +0 -0
- {pyloid-0.17.2 → pyloid-0.17.3}/src/pyloid/utils.py +0 -0
@@ -81,14 +81,20 @@ class CustomWebEngineView(QWebEngineView):
|
|
81
81
|
self.resize_direction = None
|
82
82
|
self.screen_geometry = self.screen().virtualGeometry()
|
83
83
|
self.is_resizing_enabled = True
|
84
|
+
|
85
|
+
self.setAttribute(Qt.WA_SetCursor, False)
|
86
|
+
|
87
|
+
self.is_in_resize_area = False
|
84
88
|
|
85
89
|
def mouse_press_event(self, event):
|
90
|
+
if self.parent.frame or not self.is_resizing_enabled:
|
91
|
+
return
|
92
|
+
|
86
93
|
if event.button() == Qt.LeftButton:
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
self.resize_start_pos = event.globalPos()
|
94
|
+
self.resize_direction = self.get_resize_direction(event.pos())
|
95
|
+
if self.resize_direction:
|
96
|
+
self.is_resizing = True
|
97
|
+
self.resize_start_pos = event.globalPos()
|
92
98
|
|
93
99
|
def start_system_drag(self):
|
94
100
|
"""네이티브 시스템 창 이동 시작"""
|
@@ -96,21 +102,42 @@ class CustomWebEngineView(QWebEngineView):
|
|
96
102
|
self.parent._window.windowHandle().startSystemMove()
|
97
103
|
|
98
104
|
def mouse_move_event(self, event):
|
99
|
-
if self.
|
105
|
+
if self.parent.frame or not self.is_resizing_enabled:
|
106
|
+
return
|
107
|
+
|
108
|
+
# 리사이징 방향 확인
|
109
|
+
was_in_resize_area = self.is_in_resize_area
|
110
|
+
resize_direction = self.get_resize_direction(event.pos())
|
111
|
+
self.is_in_resize_area = bool(resize_direction)
|
112
|
+
|
113
|
+
if resize_direction and not self.is_resizing:
|
114
|
+
self.set_cursor_for_resize_direction(resize_direction)
|
115
|
+
|
116
|
+
if self.is_resizing:
|
100
117
|
self.resize_window(event.globalPos())
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
118
|
+
return
|
119
|
+
|
120
|
+
# 리사이징 영역 진입/이탈 시에만 커서 변경
|
121
|
+
if self.is_in_resize_area != was_in_resize_area:
|
122
|
+
if self.is_in_resize_area:
|
123
|
+
# self.setAttribute(Qt.WA_SetCursor, True)
|
124
|
+
pass
|
106
125
|
else:
|
107
126
|
self.unsetCursor()
|
127
|
+
# self.setAttribute(Qt.WA_SetCursor, False)
|
108
128
|
|
109
129
|
def mouse_release_event(self, event):
|
130
|
+
if self.parent.frame or not self.is_resizing_enabled:
|
131
|
+
return
|
132
|
+
|
110
133
|
if event.button() == Qt.LeftButton:
|
111
134
|
self.is_resizing = False
|
112
|
-
|
113
|
-
self.
|
135
|
+
|
136
|
+
if self.resize_direction:
|
137
|
+
self.unsetCursor()
|
138
|
+
self.resize_direction = None
|
139
|
+
|
140
|
+
self.setAttribute(Qt.WA_SetCursor, False)
|
114
141
|
|
115
142
|
def eventFilter(self, source, event):
|
116
143
|
if self.focusProxy() is source:
|
@@ -126,7 +153,7 @@ class CustomWebEngineView(QWebEngineView):
|
|
126
153
|
if (
|
127
154
|
not self.parent.frame and self.is_resizing_enabled
|
128
155
|
): # Check if frame is not present and resizing is enabled
|
129
|
-
margin =
|
156
|
+
margin = 8 # Margin in pixels to detect edge
|
130
157
|
rect = self.rect()
|
131
158
|
direction = None
|
132
159
|
|
@@ -144,17 +171,20 @@ class CustomWebEngineView(QWebEngineView):
|
|
144
171
|
return None
|
145
172
|
|
146
173
|
def set_cursor_for_resize_direction(self, direction):
|
147
|
-
if
|
148
|
-
|
149
|
-
): # Check if frame is not present and resizing is enabled
|
174
|
+
if not self.parent.frame and direction and self.is_resizing_enabled:
|
175
|
+
cursor = None
|
150
176
|
if direction in ["left", "right"]:
|
151
|
-
|
177
|
+
cursor = Qt.SizeHorCursor
|
152
178
|
elif direction in ["top", "bottom"]:
|
153
|
-
|
179
|
+
cursor = Qt.SizeVerCursor
|
154
180
|
elif direction in ["left-top", "right-bottom"]:
|
155
|
-
|
181
|
+
cursor = Qt.SizeFDiagCursor
|
156
182
|
elif direction in ["right-top", "left-bottom"]:
|
157
|
-
|
183
|
+
cursor = Qt.SizeBDiagCursor
|
184
|
+
|
185
|
+
if cursor:
|
186
|
+
self.setCursor(cursor)
|
187
|
+
self.setAttribute(Qt.WA_SetCursor, True)
|
158
188
|
|
159
189
|
def resize_window(self, global_pos):
|
160
190
|
if (
|
@@ -1856,7 +1886,7 @@ class BrowserWindow:
|
|
1856
1886
|
Parameters
|
1857
1887
|
----------
|
1858
1888
|
handler : callable
|
1859
|
-
요청을 처리할 핸들러 함수. QWebEngineDesktopMediaRequest
|
1889
|
+
요청을 처리할 핸들러 함수. QWebEngineDesktopMediaRequest��� 인자로 받습니다.
|
1860
1890
|
|
1861
1891
|
Examples
|
1862
1892
|
--------
|
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
|