From f5aaec79e0c480bccaef4f33f069e4d90b52063f Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Mon, 3 Feb 2020 16:39:24 -0300 Subject: [PATCH] Hide monitors that are not visible --- xrandroll/monitor_item.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xrandroll/monitor_item.py b/xrandroll/monitor_item.py index 56a1bbc..0ccc919 100644 --- a/xrandroll/monitor_item.py +++ b/xrandroll/monitor_item.py @@ -50,6 +50,11 @@ class MonitorItem(QGraphicsRectItem, QObject): self.setBrush(QBrush("#f1f1f1", Qt.SolidPattern)) self.setZValue(-1000) + if not data["current_mode"]: # Disconnected or disabled + self.hide() + else: + self.show() + def mousePressEvent(self, event): self.window.pos_label.show() self.setCursor(Qt.ClosedHandCursor)