pyloid 0.12.0__py3-none-any.whl → 0.12.1__py3-none-any.whl
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.
pyloid/pyloid.py
CHANGED
@@ -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
|
|
@@ -4,11 +4,11 @@ pyloid/autostart.py,sha256=K7DQYl4LHItvPp0bt1V9WwaaZmVSTeGvadkcwG-KKrI,3899
|
|
4
4
|
pyloid/custom/titlebar.py,sha256=itzK9pJbZMQ7BKca9kdbuHMffurrw15UijR6OU03Xsk,3894
|
5
5
|
pyloid/filewatcher.py,sha256=n8N56D65le5TpsgxXb7z-FO_0lqv4UYD4yGq_UuMrAs,1285
|
6
6
|
pyloid/monitor.py,sha256=fqDnZ_7dpxVZLVJ5gCluDRY2USrQ5YL_fw1AnYivhsk,12741
|
7
|
-
pyloid/pyloid.py,sha256=
|
7
|
+
pyloid/pyloid.py,sha256=_LfeZYCRQlDOKUVN_Kcn8sF5kGPBF15s-FlB4zV50pA,48917
|
8
8
|
pyloid/timer.py,sha256=1bYhqte3rV77vaeMUkcTgmx2ux7FtCqLCx9lIC2-COg,4360
|
9
9
|
pyloid/tray.py,sha256=rXgdkvzGxtie_EIcTSA7fjuta4nJk5THhNkGFcfv5Ew,634
|
10
10
|
pyloid/utils.py,sha256=DQerZWU_0o8dHcJ5y3yXf9i5OXn7KQZqU-hVBq3uPUA,711
|
11
|
-
pyloid-0.12.
|
12
|
-
pyloid-0.12.
|
13
|
-
pyloid-0.12.
|
14
|
-
pyloid-0.12.
|
11
|
+
pyloid-0.12.1.dist-info/LICENSE,sha256=MTYF-6xpRekyTUglRweWtbfbwBL1I_3Bgfbm_SNOuI8,11525
|
12
|
+
pyloid-0.12.1.dist-info/METADATA,sha256=xAFTet-qhVaN0LVtJTi6gEbJ4v4vG6uT4yjmLQwHaow,6069
|
13
|
+
pyloid-0.12.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
14
|
+
pyloid-0.12.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|