pyloid 0.24.2__tar.gz → 0.24.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyloid
3
- Version: 0.24.2
3
+ Version: 0.24.4
4
4
  Summary:
5
5
  Author: aesthetics-of-record
6
6
  Author-email: 111675679+aesthetics-of-record@users.noreply.github.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyloid"
3
- version = "0.24.2"
3
+ version = "0.24.4"
4
4
  description = ""
5
5
  authors = ["aesthetics-of-record <111675679+aesthetics-of-record@users.noreply.github.com>"]
6
6
  readme = "README.md"
@@ -228,12 +228,18 @@ class CustomWebEngineView(QWebEngineView):
228
228
 
229
229
  def eventFilter(self, source, event):
230
230
  if self.focusProxy() is source:
231
+ # 리사이징 영역에 있을 때는 모든 클릭 이벤트를 가로채기
232
+ if self.is_in_resize_area and event.type() == QEvent.MouseButtonPress:
233
+ self.mouse_press_event(event)
234
+ return True # 이벤트를 소비하여 웹뷰로 전달되지 않도록 함
235
+
231
236
  if event.type() == QEvent.MouseButtonPress:
232
237
  self.mouse_press_event(event)
233
238
  elif event.type() == QEvent.MouseMove:
234
239
  self.mouse_move_event(event)
235
240
  elif event.type() == QEvent.MouseButtonRelease:
236
241
  self.mouse_release_event(event)
242
+
237
243
  return super().eventFilter(source, event)
238
244
 
239
245
  def get_resize_direction(self, pos):
@@ -715,7 +721,7 @@ class _BrowserWindow:
715
721
  """
716
722
  self.width = width
717
723
  self.height = height
718
- self._window.setGeometry(self.x, self.y, self.width, self.height)
724
+ self._window.resize(self.width, self.height)
719
725
 
720
726
  def set_position(self, x: int, y: int):
721
727
  """
@@ -736,7 +742,7 @@ class _BrowserWindow:
736
742
  """
737
743
  self.x = x
738
744
  self.y = y
739
- self._window.setGeometry(self.x, self.y, self.width, self.height)
745
+ self._window.move(self.x, self.y)
740
746
 
741
747
  def set_position_by_anchor(self, anchor: str):
742
748
  """
@@ -1338,7 +1344,8 @@ class _BrowserWindow:
1338
1344
  app.run()
1339
1345
  ```
1340
1346
  """
1341
- return {"width": self.width, "height": self.height}
1347
+ size = self._window.size()
1348
+ return {"width": size.width(), "height": size.height()}
1342
1349
 
1343
1350
  def get_position(self) -> Dict[str, int]:
1344
1351
  """
@@ -1361,7 +1368,8 @@ class _BrowserWindow:
1361
1368
  app.run()
1362
1369
  ```
1363
1370
  """
1364
- return {"x": self.x, "y": self.y}
1371
+ pos = self._window.pos()
1372
+ return {"x": pos.x(), "y": pos.y()}
1365
1373
 
1366
1374
  def get_title(self) -> str:
1367
1375
  """
@@ -10,7 +10,9 @@ if TYPE_CHECKING:
10
10
 
11
11
 
12
12
  class BaseAPI(PyloidAPI):
13
- def __init__(self, window_id: str, data: dict, app: "_Pyloid", rpc_url: Optional[str] = None):
13
+ def __init__(
14
+ self, window_id: str, data: dict, app: "_Pyloid", rpc_url: Optional[str] = None
15
+ ):
14
16
  super().__init__()
15
17
  self.window_id: str = window_id
16
18
  self.data: dict = data
@@ -174,17 +176,15 @@ class BaseAPI(PyloidAPI):
174
176
  def getSize(self):
175
177
  """Returns the size of the window."""
176
178
  window = self.app.get_window_by_id(self.window_id)
177
- return (
178
- {"width": window._window.width, "height": window._window.height}
179
- if window
180
- else {"width": 0, "height": 0}
181
- )
179
+ size = window.get_size()
180
+ return size if window else {"width": 0, "height": 0}
182
181
 
183
182
  @Bridge(result=dict)
184
183
  def getPosition(self):
185
184
  """Returns the position of the window."""
186
185
  window = self.app.get_window_by_id(self.window_id)
187
- return {"x": window._window.x, "y": window._window.y} if window else {"x": 0, "y": 0}
186
+ pos = window.get_position()
187
+ return pos if window else {"x": 0, "y": 0}
188
188
 
189
189
  ###############################################################
190
190
  # Clipboard
@@ -252,10 +252,8 @@ class BaseAPI(PyloidAPI):
252
252
  def getProductionPath(self, path: str):
253
253
  """Returns the production path of the application."""
254
254
  return get_production_path(path)
255
-
255
+
256
256
  @Bridge(result=str)
257
257
  def getRpcUrl(self):
258
258
  """Returns the RPC URL of the application."""
259
259
  return self.rpc_url
260
-
261
-
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