pyloid 0.16.6__tar.gz → 0.16.8__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -198,4 +198,4 @@ Apache License
198
198
  distributed under the License is distributed on an "AS IS" BASIS,
199
199
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
200
  See the License for the specific language governing permissions and
201
- limitations under the License.
201
+ limitations under the License.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyloid
3
- Version: 0.16.6
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.6"
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()
@@ -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