Fix join argument.
[bertos.git] / wizard / BIntroPage.py
index 6352d20e83cf24572bcf764359ced3decfe04399..02ca94692cf1a1d3dc041f94d7387868d08b0759 100644 (file)
@@ -49,19 +49,8 @@ class BIntroPage(BWizardPage):
     def __init__(self):
         BWizardPage.__init__(self, UI_LOCATION + "/intro_page.ui")
         self.setTitle(self.tr("Welcome in BeRTOS Wizard!"))
-        self.image = QPixmap(":/images/logo.png")
-
-    ## Overloaded QWidget methods ##
-
-    def resizeEvent(self, event):
-        self._scalePicture()
-        BWizardPage.resizeEvent(self, event)
-
-    def showEvent(self, event):
-        self._scalePicture()
-        BWizardPage.showEvent(self, event)
-
-    ##
+        pixmap = self.pageContent.imageLabel.pixmap()
+        self.pageContent.imageLabel.setPixmap(pixmap.scaled(300, 400, Qt.KeepAspectRatio))
 
     ## Overloaded QWizardPage methods ##
 
@@ -71,13 +60,4 @@ class BIntroPage(BWizardPage):
         """
         return True
 
-    ####
-
-    def _scalePicture(self):
-        """
-        I need this method because the scaledContent property of the QLabel
-        doesn't care the aspect ratio.
-        """
-        label_size = self.pageContent.imageLabel.size()
-        scaled_image = self.image.scaled(label_size, Qt.KeepAspectRatio)
-        self.pageContent.imageLabel.setPixmap(scaled_image)
+    ####
\ No newline at end of file