Skip to content

Commit

Permalink
Improvements to clock's auto color detector
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Jul 24, 2024
1 parent 2e05f3a commit 3f8bdc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elevenclock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3f8bdc8

Please sign in to comment.