Preferences/ConfigurationPages/NotificationsPage.py

changeset 2224
c681f765d64d
parent 2190
abd65b78425e
child 2280
8e85ca3fabe7
equal deleted inserted replaced
2223:054c285dab38 2224:c681f765d64d
31 """ 31 """
32 super().__init__() 32 super().__init__()
33 self.setupUi(self) 33 self.setupUi(self)
34 self.setObjectName("NotificationsPage") 34 self.setObjectName("NotificationsPage")
35 35
36 geom = QApplication.desktop().availableGeometry() 36 minX, maxX = self.xSpinBox.maximum(), self.xSpinBox.minimum()
37 self.xSpinBox.setMaximum(geom.width()) 37 minY, maxY = self.ySpinBox.maximum(), self.ySpinBox.minimum()
38 self.ySpinBox.setMaximum(geom.height()) 38 desk = QApplication.desktop()
39 for screen in range(desk.screenCount()):
40 geom = desk.availableGeometry(screen)
41 minX = min(minX, geom.x())
42 maxX = max(maxX, geom.x() + geom.width())
43 minY = min(minY, geom.y())
44 maxY = max(maxY, geom.y() + geom.height())
45 self.xSpinBox.setMinimum(minX)
46 self.xSpinBox.setMaximum(maxX)
47 self.ySpinBox.setMinimum(minY)
48 self.ySpinBox.setMaximum(maxY)
39 49
40 self.__notification = None 50 self.__notification = None
41 51
42 # set initial values 52 # set initial values
43 self.enableCheckBox.setChecked(Preferences.getUI("NotificationsEnabled")) 53 self.enableCheckBox.setChecked(Preferences.getUI("NotificationsEnabled"))

eric ide

mercurial