Fix crash due to geometry computation

Julien LepillerFri Jun 16 09:16:56+0200 2023

50d1750

Fix crash due to geometry computation

offlate/ui/config/settings.py

280280
            filename = os.path.dirname(__file__) + '/../data/' + key + '.png'
281281
            icon = QPixmap(filename)
282282
            iconLabel = QLabel(self)
283-
            iconLabel.setPixmap(icon.scaled(48*widthScale, 48*heightScale,
283+
            iconLabel.setPixmap(icon.scaled(int(48*widthScale), int(48*heightScale),
284284
                Qt.KeepAspectRatio, Qt.SmoothTransformation))
285285
            iconLabel.setAlignment(Qt.AlignCenter)
286286

offlate/ui/manager.py

153153
    def about(self):
154154
        geometry = self.parent().geometry()
155155
        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),
158158
                300, 200)
159159
        w.exec_()
160160