pyloid 0.16.10__py3-none-any.whl → 0.16.11__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pyloid/monitor.py +24 -0
- pyloid/pyloid.py +2 -2
- {pyloid-0.16.10.dist-info → pyloid-0.16.11.dist-info}/METADATA +1 -1
- {pyloid-0.16.10.dist-info → pyloid-0.16.11.dist-info}/RECORD +6 -6
- {pyloid-0.16.10.dist-info → pyloid-0.16.11.dist-info}/LICENSE +0 -0
- {pyloid-0.16.10.dist-info → pyloid-0.16.11.dist-info}/WHEEL +0 -0
pyloid/monitor.py
CHANGED
@@ -895,3 +895,27 @@ class Monitor():
|
|
895
895
|
monitor = self.screen
|
896
896
|
monitor.refreshRateChanged.connect(callback)
|
897
897
|
|
898
|
+
def virtual_geometry_changed(self, callback: Callable):
|
899
|
+
"""
|
900
|
+
Registers a callback for the event that occurs when the virtual geometry of the monitor changes.
|
901
|
+
|
902
|
+
Parameters
|
903
|
+
----------
|
904
|
+
callback : Callable
|
905
|
+
The function to be called when the virtual geometry changes.
|
906
|
+
|
907
|
+
Examples
|
908
|
+
--------
|
909
|
+
```python
|
910
|
+
app = Pyloid("Pyloid-App")
|
911
|
+
|
912
|
+
def on_virtual_geometry_changed():
|
913
|
+
print("Virtual geometry changed!")
|
914
|
+
|
915
|
+
monitor = app.get_primary_monitor()
|
916
|
+
monitor.virtual_geometry_changed(on_virtual_geometry_changed)
|
917
|
+
```
|
918
|
+
"""
|
919
|
+
monitor = self.screen
|
920
|
+
monitor.virtualGeometryChanged.connect(callback)
|
921
|
+
|
pyloid/pyloid.py
CHANGED
@@ -12,7 +12,7 @@ from PySide6.QtGui import (
|
|
12
12
|
QImage,
|
13
13
|
QAction,
|
14
14
|
)
|
15
|
-
from PySide6.QtCore import Qt, Signal, QObject, QTimer
|
15
|
+
from PySide6.QtCore import Qt, Signal, QObject, QTimer, QEvent
|
16
16
|
from PySide6.QtNetwork import QLocalServer, QLocalSocket
|
17
17
|
from .api import PyloidAPI
|
18
18
|
from typing import List, Optional, Dict, Callable, Union, Literal
|
@@ -1395,4 +1395,4 @@ class Pyloid(QApplication):
|
|
1395
1395
|
window.web_view.page().runJavaScript(js_code)
|
1396
1396
|
window.web_view.page().setBackgroundColor(
|
1397
1397
|
Qt.GlobalColor.black if self.theme == "dark" else Qt.GlobalColor.white
|
1398
|
-
)
|
1398
|
+
)
|
@@ -6,12 +6,12 @@ pyloid/custom/titlebar.py,sha256=itzK9pJbZMQ7BKca9kdbuHMffurrw15UijR6OU03Xsk,389
|
|
6
6
|
pyloid/filewatcher.py,sha256=3M5zWVUf1OhlkWJcDFC8ZA9agO4Q-U8WdgGpy6kaVz0,4601
|
7
7
|
pyloid/js_api/event_api.py,sha256=_52yyBonqecmMvJpFW7OMNi_jX8Nrteqw_kI6r-DGG0,951
|
8
8
|
pyloid/js_api/window_api.py,sha256=_EAZ0GG0oa0EeIIyWnys03InLQuQfv4ZPezMouOJEGc,8155
|
9
|
-
pyloid/monitor.py,sha256=
|
10
|
-
pyloid/pyloid.py,sha256=
|
9
|
+
pyloid/monitor.py,sha256=1mXvHm5deohnNlTLcRx4sT4x-stnOIb0dUQnnxN50Uo,28295
|
10
|
+
pyloid/pyloid.py,sha256=ar-3yP8IqB6HCWwuxJmjJZ9kekn7LhHqnNOTH-qhxpM,43925
|
11
11
|
pyloid/timer.py,sha256=RqMsChFUd93cxMVgkHWiIKrci0QDTBgJSTULnAtYT8M,8712
|
12
12
|
pyloid/tray.py,sha256=D12opVEc2wc2T4tK9epaN1oOdeziScsIVNM2uCN7C-A,1710
|
13
13
|
pyloid/utils.py,sha256=VGZE2liY8_AElEqxVe1YLbk3fWlcAevpRc6oOTTgi-U,1927
|
14
|
-
pyloid-0.16.
|
15
|
-
pyloid-0.16.
|
16
|
-
pyloid-0.16.
|
17
|
-
pyloid-0.16.
|
14
|
+
pyloid-0.16.11.dist-info/LICENSE,sha256=F96EzotgWhhpnQTW2TcdoqrMDir1jyEo6H915tGQ-QE,11524
|
15
|
+
pyloid-0.16.11.dist-info/METADATA,sha256=VWQ196ZX2TYxekFHEZWaswkDTIzfVPzyqAybdRB6pSk,3051
|
16
|
+
pyloid-0.16.11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
17
|
+
pyloid-0.16.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|