This commit is contained in:
Roberto Alsina 2020-02-03 10:13:35 -03:00
parent 82e08825aa
commit 58c385f383
3 changed files with 8 additions and 7 deletions

View File

@ -1,2 +1,3 @@
from .main import main
main()

View File

@ -80,7 +80,7 @@ def is_replica_of(a, b):
and a["pos_y"] == b["pos_y"]
and a["res_x"] == b["res_x"]
and a["res_y"] == b["res_y"]
and b['enabled']
and b["enabled"]
)

View File

@ -20,13 +20,13 @@ class MonitorItem(QGraphicsRectItem, QObject):
def update_visuals(self, data):
self.setRect(0, 0, data["res_x"], data["res_y"])
self.setPos(data["pos_x"], data["pos_y"])
if data['orientation'] == 0:
self.bottom_edge.setRect(0, data['res_y'] - 50, data["res_x"], 50)
elif data['orientation'] == 1:
self.bottom_edge.setRect(data['res_x'] - 50, 0, 50, data["res_y"])
elif data['orientation'] == 2:
if data["orientation"] == 0:
self.bottom_edge.setRect(0, data["res_y"] - 50, data["res_x"], 50)
elif data["orientation"] == 1:
self.bottom_edge.setRect(data["res_x"] - 50, 0, 50, data["res_y"])
elif data["orientation"] == 2:
self.bottom_edge.setRect(0, 0, data["res_x"], 50)
elif data['orientation'] == 3:
elif data["orientation"] == 3:
self.bottom_edge.setRect(0, 0, 50, data["res_y"])
if data["replica_of"]:
label_text = f"{self.name} [{','.join(data['replica_of'])}]"