pyloid 0.12.0__tar.gz → 0.12.1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {pyloid-0.12.0 → pyloid-0.12.1}/PKG-INFO +1 -1
- {pyloid-0.12.0 → pyloid-0.12.1}/pyproject.toml +1 -1
- {pyloid-0.12.0 → pyloid-0.12.1}/src/pyloid/pyloid.py +28 -8
- {pyloid-0.12.0 → pyloid-0.12.1}/LICENSE +0 -0
- {pyloid-0.12.0 → pyloid-0.12.1}/README.md +0 -0
- {pyloid-0.12.0 → pyloid-0.12.1}/src/pyloid/__init__.py +0 -0
- {pyloid-0.12.0 → pyloid-0.12.1}/src/pyloid/api.py +0 -0
- {pyloid-0.12.0 → pyloid-0.12.1}/src/pyloid/autostart.py +0 -0
- {pyloid-0.12.0 → pyloid-0.12.1}/src/pyloid/custom/titlebar.py +0 -0
- {pyloid-0.12.0 → pyloid-0.12.1}/src/pyloid/filewatcher.py +0 -0
- {pyloid-0.12.0 → pyloid-0.12.1}/src/pyloid/monitor.py +0 -0
- {pyloid-0.12.0 → pyloid-0.12.1}/src/pyloid/timer.py +0 -0
- {pyloid-0.12.0 → pyloid-0.12.1}/src/pyloid/tray.py +0 -0
- {pyloid-0.12.0 → pyloid-0.12.1}/src/pyloid/utils.py +0 -0
@@ -15,6 +15,7 @@ from PySide6.QtGui import (
|
|
15
15
|
QClipboard,
|
16
16
|
QImage,
|
17
17
|
QAction,
|
18
|
+
QCursor,
|
18
19
|
)
|
19
20
|
from PySide6.QtCore import Qt, Signal, QPoint, QUrl, QObject, QTimer, QSize, QEvent
|
20
21
|
from PySide6.QtNetwork import QLocalServer, QLocalSocket
|
@@ -261,6 +262,7 @@ class CustomWebEngineView(QWebEngineView):
|
|
261
262
|
self.parent = parent
|
262
263
|
self.drag_relative_position = None
|
263
264
|
self.is_dragging = False
|
265
|
+
self.screen_geometry = self.screen().availableGeometry()
|
264
266
|
|
265
267
|
def mouse_press_event(self, event):
|
266
268
|
if event.button() == Qt.LeftButton:
|
@@ -273,8 +275,25 @@ class CustomWebEngineView(QWebEngineView):
|
|
273
275
|
if not self.parent.frame and self.is_dragging:
|
274
276
|
# 현재 마우스 위치를 전역 좌표로 가져옵니다
|
275
277
|
current_global_pos = event.globalPos()
|
276
|
-
|
277
|
-
|
278
|
+
|
279
|
+
# 화면 경계를 계산합니다
|
280
|
+
left_boundary = self.screen_geometry.left()
|
281
|
+
right_boundary = self.screen_geometry.right()
|
282
|
+
top_boundary = self.screen_geometry.top()
|
283
|
+
bottom_boundary = self.screen_geometry.bottom()
|
284
|
+
|
285
|
+
# 마우스 커서 위치를 제한합니다
|
286
|
+
new_cursor_pos = QPoint(
|
287
|
+
max(left_boundary, min(current_global_pos.x(), right_boundary)),
|
288
|
+
max(top_boundary, min(current_global_pos.y(), bottom_boundary)),
|
289
|
+
)
|
290
|
+
|
291
|
+
# 마우스 커서를 새 위치로 이동합니다
|
292
|
+
QCursor.setPos(new_cursor_pos)
|
293
|
+
|
294
|
+
# 창의 새 위치를 계산합니다
|
295
|
+
new_window_pos = new_cursor_pos - self.drag_relative_position
|
296
|
+
|
278
297
|
# 창을 새 위치로 이동합니다
|
279
298
|
self.parent._window.move(new_window_pos)
|
280
299
|
|
@@ -283,12 +302,13 @@ class CustomWebEngineView(QWebEngineView):
|
|
283
302
|
self.is_dragging = False
|
284
303
|
|
285
304
|
def eventFilter(self, source, event):
|
286
|
-
if self.focusProxy() is source
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
305
|
+
if self.focusProxy() is source:
|
306
|
+
if event.type() == QEvent.MouseButtonPress:
|
307
|
+
self.mouse_press_event(event)
|
308
|
+
elif event.type() == QEvent.MouseMove:
|
309
|
+
self.mouse_move_event(event)
|
310
|
+
elif event.type() == QEvent.MouseButtonRelease:
|
311
|
+
self.mouse_release_event(event)
|
292
312
|
return super().eventFilter(source, event)
|
293
313
|
|
294
314
|
|
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
|