pyloid 0.16.11__tar.gz → 0.16.12__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.11
3
+ Version: 0.16.12
4
4
  Summary:
5
5
  Author: aesthetics-of-record
6
6
  Author-email: 111675679+aesthetics-of-record@users.noreply.github.com
@@ -10,6 +10,7 @@ Classifier: Programming Language :: Python :: 3.9
10
10
  Classifier: Programming Language :: Python :: 3.10
11
11
  Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Programming Language :: Python :: 3.12
13
+ Requires-Dist: mss (>=9.0.2,<10.0.0)
13
14
  Requires-Dist: pyside6 (>=6.7.3,<7.0.0)
14
15
  Description-Content-Type: text/markdown
15
16
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyloid"
3
- version = "0.16.11"
3
+ version = "0.16.12"
4
4
  description = ""
5
5
  authors = ["aesthetics-of-record <111675679+aesthetics-of-record@users.noreply.github.com>"]
6
6
  readme = "README.md"
@@ -11,6 +11,7 @@ packages = [
11
11
  [tool.poetry.dependencies]
12
12
  python = ">=3.9,<3.13"
13
13
  pyside6 = "^6.7.3"
14
+ mss = "^9.0.2"
14
15
 
15
16
 
16
17
  [build-system]
@@ -251,9 +251,45 @@ class BrowserWindow:
251
251
  self.set_size(self.width, self.height)
252
252
  self.set_position(self.x, self.y)
253
253
 
254
- # allow local file access to remote urls
254
+ # allow local file access to remote urls and screen capture
255
255
  self.web_view.settings().setAttribute(
256
- QWebEngineSettings.LocalContentCanAccessRemoteUrls, True
256
+ QWebEngineSettings.WebAttribute.LocalContentCanAccessRemoteUrls, True
257
+ )
258
+ self.web_view.settings().setAttribute(
259
+ QWebEngineSettings.WebAttribute.ScreenCaptureEnabled, True
260
+ )
261
+ self.web_view.settings().setAttribute(
262
+ QWebEngineSettings.WebAttribute.AutoLoadImages, True
263
+ )
264
+ self.web_view.settings().setAttribute(
265
+ QWebEngineSettings.WebAttribute.JavascriptEnabled, True
266
+ )
267
+ self.web_view.settings().setAttribute(
268
+ QWebEngineSettings.WebAttribute.LocalStorageEnabled, True
269
+ )
270
+ self.web_view.settings().setAttribute(
271
+ QWebEngineSettings.WebAttribute.ErrorPageEnabled, True
272
+ )
273
+ self.web_view.settings().setAttribute(
274
+ QWebEngineSettings.WebAttribute.AutoLoadIconsForPage, True
275
+ )
276
+ self.web_view.settings().setAttribute(
277
+ QWebEngineSettings.WebAttribute.ShowScrollBars, True
278
+ )
279
+ self.web_view.settings().setAttribute(
280
+ QWebEngineSettings.WebAttribute.DnsPrefetchEnabled, True
281
+ )
282
+ self.web_view.settings().setAttribute(
283
+ QWebEngineSettings.WebAttribute.PdfViewerEnabled, True
284
+ )
285
+ self.web_view.settings().setAttribute(
286
+ QWebEngineSettings.WebAttribute.FullScreenSupportEnabled, True
287
+ )
288
+ self.web_view.settings().setAttribute(
289
+ QWebEngineSettings.WebAttribute.JavascriptCanAccessClipboard, True
290
+ )
291
+ self.web_view.settings().setUnknownUrlSchemePolicy(
292
+ QWebEngineSettings.UnknownUrlSchemePolicy.AllowAllUnknownUrlSchemes
257
293
  )
258
294
 
259
295
  # Set icon
@@ -305,7 +341,6 @@ class BrowserWindow:
305
341
  source = bytes(qwebchannel_js.readAll()).decode("utf-8")
306
342
  self.web_view.page().runJavaScript(source)
307
343
  qwebchannel_js.close()
308
-
309
344
 
310
345
  js_code = """
311
346
  if (typeof QWebChannel !== 'undefined') {
@@ -1667,7 +1702,7 @@ class BrowserWindow:
1667
1702
  Examples
1668
1703
  --------
1669
1704
  ```python
1670
- window.set_web_engine_view_attribute(QWebEngineSettings.WebAttribute.JavascriptCanAccessClipboard, False)
1705
+ window.set_web_engine_view_attribute(QWebEngineSettings.WebAttribute.ScreenCaptureEnabled, False)
1671
1706
  ```
1672
1707
  """
1673
1708
  settings = self.web_view.settings()
@@ -1690,7 +1725,7 @@ class BrowserWindow:
1690
1725
  Examples
1691
1726
  --------
1692
1727
  ```python
1693
- window.is_web_engine_view_attribute(QWebEngineSettings.WebAttribute.JavascriptCanAccessClipboard)
1728
+ window.is_web_engine_view_attribute(QWebEngineSettings.WebAttribute.ScreenCaptureEnabled)
1694
1729
  ```
1695
1730
  """
1696
1731
  settings = self.web_view.settings()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes