Add bigger image in intro page and remove scaling code.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 31 May 2010 13:43:52 +0000 (13:43 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 31 May 2010 13:43:52 +0000 (13:43 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3888 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BIntroPage.py
wizard/images/logo.png
wizard/ui/final_page.ui

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
index df6c7353ad9fdd61093b5104da7cc9c19961ec0a..9012930bb6ce14a46e6e239803238ead28fa405e 100644 (file)
Binary files a/wizard/images/logo.png and b/wizard/images/logo.png differ
index 8f90b80896207140b0199e43ef3d8b1b08d9ed8c..e004b08ebbeb1367c5d2a78a86b034083e26abd7 100644 (file)
         <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Project created successfully!&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;&quot;&gt;&lt;/p&gt;
-&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;You can now start developing your application.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Project created successfully!&lt;/span&gt;&lt;/p&gt;
+&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;You can now start developing your application.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
        </property>
        <property name="textFormat">
         <enum>Qt::RichText</enum>
@@ -72,8 +71,8 @@ p, li { white-space: pre-wrap; }
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>564</width>
-        <height>82</height>
+        <width>556</width>
+        <height>76</height>
        </rect>
       </property>
      </widget>