Fix crash due to geometry computation
offlate/ui/config/settings.py
280 | 280 | filename = os.path.dirname(__file__) + '/../data/' + key + '.png' | |
281 | 281 | icon = QPixmap(filename) | |
282 | 282 | iconLabel = QLabel(self) | |
283 | - | iconLabel.setPixmap(icon.scaled(48*widthScale, 48*heightScale, | |
283 | + | iconLabel.setPixmap(icon.scaled(int(48*widthScale), int(48*heightScale), | |
284 | 284 | Qt.KeepAspectRatio, Qt.SmoothTransformation)) | |
285 | 285 | iconLabel.setAlignment(Qt.AlignCenter) | |
286 | 286 |
offlate/ui/manager.py
153 | 153 | def about(self): | |
154 | 154 | geometry = self.parent().geometry() | |
155 | 155 | w = AboutWindow() | |
156 | - | w.setGeometry(geometry.x() + geometry.width()/2 - 300, | |
157 | - | geometry.y() + geometry.height()/2 - 200, | |
156 | + | w.setGeometry(int(geometry.x() + geometry.width()/2 - 300), | |
157 | + | int(geometry.y() + geometry.height()/2 - 200), | |
158 | 158 | 300, 200) | |
159 | 159 | w.exec_() | |
160 | 160 |