From 2963af53310dbf2cd9e0b031fc2ed944ad4684ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denilson=20S=C3=A1=20Maia?= Date: Mon, 9 Sep 2024 00:15:37 +0200 Subject: [PATCH] Specify bg and fg colors The old code was rendering a white background with a user-defined foreground (i.e. text) color. If the user has a dark theme, that means white background with white text, making the tool unusable. This commit forces a pair of colors. It would be even beter to reuse the user-chosen colors from the current theme, but this is already good enough. --- protractor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protractor.py b/protractor.py index 319051c..fa5ca30 100755 --- a/protractor.py +++ b/protractor.py @@ -115,7 +115,7 @@ def __init__(self, parent): self.setWindowFlags(Qt.WindowStaysOnTopHint) self.setAttribute(Qt.WA_TranslucentBackground, True) # self.setAttribute(Qt.WA_TransparentForMouseEvents) - self.setStyleSheet("QLabel#angle { font-size: 20px; background-color: white; padding: 2px; }") + self.setStyleSheet("QLabel#angle { font-size: 20px; background-color: silver; color: black; padding: 2px; }") self.setCursor(Qt.OpenHandCursor) self.handleC = Handle(self) self.handle1 = Handle(self)