From 3f8bdc849f48a895981309d343694bd910293364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Climent?= Date: Wed, 24 Jul 2024 18:02:40 +0200 Subject: [PATCH] Improvements to clock's auto color detector --- elevenclock/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elevenclock/__init__.py b/elevenclock/__init__.py index 2cf07529..29e901bf 100644 --- a/elevenclock/__init__.py +++ b/elevenclock/__init__.py @@ -1127,7 +1127,7 @@ def checkAndUpdateBackground(self) -> None: if ENABLE_AUTOMATIC_BACKGROUND_COLOR or ENABLE_AUTOMATIC_TEXT_COLOR: screen = self.screen().geometry() - BackgroundIntegerColor = self.screen().grabWindow(0, self.x() - screen.x() + self.label.x() + (self.label.width() + 1 if self.CLOCK_ON_THE_LEFT else - 2), self.y()-screen.y(), 1, 1).toImage().pixel(0, 0) + BackgroundIntegerColor = self.screen().grabWindow(0, self.x() - screen.x() + self.colorWidget.x() + (self.colorWidget.width() + 1 if self.CLOCK_ON_THE_LEFT else - 5), self.y()-screen.y(), 1, 1).toImage().pixel(0, 0) if globals.trayIcon: