31 self.setupUi(self) |
33 self.setupUi(self) |
32 self.setObjectName("NotificationsPage") |
34 self.setObjectName("NotificationsPage") |
33 |
35 |
34 minX, maxX = self.xSpinBox.maximum(), self.xSpinBox.minimum() |
36 minX, maxX = self.xSpinBox.maximum(), self.xSpinBox.minimum() |
35 minY, maxY = self.ySpinBox.maximum(), self.ySpinBox.minimum() |
37 minY, maxY = self.ySpinBox.maximum(), self.ySpinBox.minimum() |
36 desk = QApplication.desktop() |
38 if qVersionTuple() >= (5, 10, 0): |
37 for screen in range(desk.screenCount()): |
39 for screen in QApplication.screens(): |
38 geom = desk.availableGeometry(screen) |
40 geom = screen.availableGeometry() |
39 minX = min(minX, geom.x()) |
41 minX = min(minX, geom.x()) |
40 maxX = max(maxX, geom.x() + geom.width()) |
42 maxX = max(maxX, geom.x() + geom.width()) |
41 minY = min(minY, geom.y()) |
43 minY = min(minY, geom.y()) |
42 maxY = max(maxY, geom.y() + geom.height()) |
44 maxY = max(maxY, geom.y() + geom.height()) |
|
45 else: |
|
46 desk = QApplication.desktop() |
|
47 for screen in range(desk.screenCount()): |
|
48 geom = desk.availableGeometry(screen) |
|
49 minX = min(minX, geom.x()) |
|
50 maxX = max(maxX, geom.x() + geom.width()) |
|
51 minY = min(minY, geom.y()) |
|
52 maxY = max(maxY, geom.y() + geom.height()) |
43 self.xSpinBox.setMinimum(minX) |
53 self.xSpinBox.setMinimum(minX) |
44 self.xSpinBox.setMaximum(maxX) |
54 self.xSpinBox.setMaximum(maxX) |
45 self.ySpinBox.setMinimum(minY) |
55 self.ySpinBox.setMinimum(minY) |
46 self.ySpinBox.setMaximum(maxY) |
56 self.ySpinBox.setMaximum(maxY) |
47 |
57 |