200 """ |
200 """ |
201 self.adjustSize() |
201 self.adjustSize() |
202 |
202 |
203 if not self.__settingPosition: |
203 if not self.__settingPosition: |
204 pos = Preferences.getUI("NotificationPosition") |
204 pos = Preferences.getUI("NotificationPosition") |
205 try: |
205 screen = self.screen() |
206 screen = self.screen() |
|
207 except AttributeError: |
|
208 # < Qt 5.15 |
|
209 from PyQt6.QtGui import QGuiApplication |
|
210 |
|
211 screen = QGuiApplication.screenAt(pos) |
|
212 screenGeom = screen.geometry() |
206 screenGeom = screen.geometry() |
213 |
207 |
214 newX = pos.x() |
208 newX = pos.x() |
215 newY = pos.y() |
209 newY = pos.y() |
216 if newX < screenGeom.x(): |
210 if newX < screenGeom.x(): |