Use screen of window instead of primary screen

Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
Roy Nieterau 2023-03-07 11:08:10 +01:00 committed by Milan Kolar
parent 40125fa6a5
commit 300a443510

View file

@ -99,7 +99,7 @@ class Popup(QtWidgets.QDialog):
height = max(height, window.sizeHint().height())
try:
screen = QtWidgets.QApplication.primaryScreen()
screen = window.screen()
desktop_geometry = screen.availableGeometry()
except AttributeError:
# Backwards compatibility for older Qt versions