pyloid 0.16.5__tar.gz → 0.16.8__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyloid
3
- Version: 0.16.5
3
+ Version: 0.16.8
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.16.5"
3
+ version = "0.16.8"
4
4
  description = ""
5
5
  authors = ["aesthetics-of-record <111675679+aesthetics-of-record@users.noreply.github.com>"]
6
6
  readme = "README.md"
@@ -277,9 +277,48 @@ class BrowserWindow:
277
277
  self.set_size(self.width, self.height)
278
278
  self.set_position(self.x, self.y)
279
279
 
280
- # allow local file access to remote urls
280
+ # allow local file access to remote urls and screen capture
281
281
  self.web_view.settings().setAttribute(
282
- QWebEngineSettings.LocalContentCanAccessRemoteUrls, True
282
+ QWebEngineSettings.WebAttribute.LocalContentCanAccessRemoteUrls, True
283
+ )
284
+ self.web_view.settings().setAttribute(
285
+ QWebEngineSettings.WebAttribute.ScreenCaptureEnabled, True
286
+ )
287
+ self.web_view.settings().setAttribute(
288
+ QWebEngineSettings.WebAttribute.AutoLoadImages, True
289
+ )
290
+ self.web_view.settings().setAttribute(
291
+ QWebEngineSettings.WebAttribute.JavascriptEnabled, True
292
+ )
293
+ self.web_view.settings().setAttribute(
294
+ QWebEngineSettings.WebAttribute.LocalStorageEnabled, True
295
+ )
296
+ self.web_view.settings().setAttribute(
297
+ QWebEngineSettings.WebAttribute.ErrorPageEnabled, True
298
+ )
299
+ self.web_view.settings().setAttribute(
300
+ QWebEngineSettings.WebAttribute.AutoLoadIconsForPage, True
301
+ )
302
+ self.web_view.settings().setAttribute(
303
+ QWebEngineSettings.WebAttribute.ShowScrollBars, True
304
+ )
305
+ self.web_view.settings().setAttribute(
306
+ QWebEngineSettings.WebAttribute.DnsPrefetchEnabled, True
307
+ )
308
+ self.web_view.settings().setAttribute(
309
+ QWebEngineSettings.WebAttribute.PdfViewerEnabled, True
310
+ )
311
+ self.web_view.settings().setAttribute(
312
+ QWebEngineSettings.WebAttribute.FullScreenSupportEnabled, True
313
+ )
314
+ self.web_view.settings().setAttribute(
315
+ QWebEngineSettings.WebAttribute.JavascriptCanAccessClipboard, True
316
+ )
317
+ self.web_view.settings().setImageAnimationPolicy(
318
+ QWebEngineSettings.ImageAnimationPolicy.Allow
319
+ )
320
+ self.web_view.settings().setUnknownUrlSchemePolicy(
321
+ QWebEngineSettings.UnknownUrlSchemePolicy.AllowAllUnknownUrlSchemes
283
322
  )
284
323
 
285
324
  # Set icon
@@ -331,7 +370,6 @@ class BrowserWindow:
331
370
  source = bytes(qwebchannel_js.readAll()).decode("utf-8")
332
371
  self.web_view.page().runJavaScript(source)
333
372
  qwebchannel_js.close()
334
-
335
373
 
336
374
  js_code = """
337
375
  if (typeof QWebChannel !== 'undefined') {
@@ -1693,7 +1731,7 @@ class BrowserWindow:
1693
1731
  Examples
1694
1732
  --------
1695
1733
  ```python
1696
- window.set_web_engine_view_attribute(QWebEngineSettings.WebAttribute.JavascriptCanAccessClipboard, False)
1734
+ window.set_web_engine_view_attribute(QWebEngineSettings.WebAttribute.ScreenCaptureEnabled, False)
1697
1735
  ```
1698
1736
  """
1699
1737
  settings = self.web_view.settings()
@@ -1716,7 +1754,7 @@ class BrowserWindow:
1716
1754
  Examples
1717
1755
  --------
1718
1756
  ```python
1719
- window.is_web_engine_view_attribute(QWebEngineSettings.WebAttribute.JavascriptCanAccessClipboard)
1757
+ window.is_web_engine_view_attribute(QWebEngineSettings.WebAttribute.ScreenCaptureEnabled)
1720
1758
  ```
1721
1759
  """
1722
1760
  settings = self.web_view.settings()
@@ -1724,14 +1762,14 @@ class BrowserWindow:
1724
1762
 
1725
1763
  def set_permission_handler(self, feature: QWebEnginePage.Feature, handler):
1726
1764
  """
1727
- 특정 권한에 대한 핸들러를 설정합니다.
1765
+ Sets a handler for a specific permission.
1728
1766
 
1729
1767
  Parameters
1730
1768
  ----------
1731
1769
  feature : QWebEnginePage.Feature
1732
- 설정할 권한 타입
1770
+ The type of permission to set
1733
1771
  handler : callable
1734
- 권한 요청을 처리할 핸들러 함수
1772
+ The handler function to process the permission request
1735
1773
 
1736
1774
  Examples
1737
1775
  --------
@@ -1753,12 +1791,12 @@ class BrowserWindow:
1753
1791
 
1754
1792
  def grant_permission(self, feature: QWebEnginePage.Feature):
1755
1793
  """
1756
- 권한 요청이 왔을 때, 특정 권한을 자동으로 허용하도록 설정합니다.
1794
+ Automatically grants a specific permission when a request is made.
1757
1795
 
1758
1796
  Parameters
1759
1797
  ----------
1760
1798
  feature : QWebEnginePage.Feature
1761
- 자동 허용할 권한 타입
1799
+ The type of permission to automatically grant
1762
1800
 
1763
1801
  Examples
1764
1802
  --------
@@ -1776,12 +1814,12 @@ class BrowserWindow:
1776
1814
 
1777
1815
  def deny_permission(self, feature: QWebEnginePage.Feature):
1778
1816
  """
1779
- 권한 요청이 왔을 때, 특정 권한을 자동으로 거부하도록 설정합니다.
1817
+ Automatically denies a specific permission when a request is made.
1780
1818
 
1781
1819
  Parameters
1782
1820
  ----------
1783
1821
  feature : QWebEnginePage.Feature
1784
- 자동 거부할 권한 타입
1822
+ The type of permission to automatically deny
1785
1823
 
1786
1824
  Examples
1787
1825
  --------
@@ -48,8 +48,9 @@ def custom_message_handler(mode, context, message):
48
48
  print(
49
49
  "\033[93mPyloid Warning: Vulkan GPU API issue detected. Switching to software backend.\033[0m"
50
50
  )
51
- os.environ["QT_QUICK_BACKEND"] = "software"
52
- custom_message_handler.vulkan_warning_shown = True
51
+ if "linux" in sys.platform:
52
+ os.environ["QT_QUICK_BACKEND"] = "software"
53
+ custom_message_handler.vulkan_warning_shown = True
53
54
 
54
55
  if "Autofill.enable failed" in message:
55
56
  print(
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