[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeexamples/plasma/javascript/plasmoids/tiger/contents/code
From:       Anne-Marie Mahfouf <annma () kde ! org>
Date:       2010-01-03 16:44:19
Message-ID: 1262537059.879288.8685.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1069529 by annma:

fix javascript tiger example, thanks to Bart for the patch!
BUG=220978


 M  +7 -6      main  


--- trunk/KDE/kdeexamples/plasma/javascript/plasmoids/tiger/contents/code/main #1069528:1069529
@@ -3,7 +3,7 @@
 plasmoid.setAction('myAction', i18n('Toggle KDE Logo'), 'plasma')
 drawLogo = true;
 
-print('size of pixmap is: ' + p.rect().width() + 'x' + p.rect().height())
+print('size of pixmap is: ' + p.rect.width + 'x' + p.rect.height)
 
 plasmoid.action_myAction = function()
 {
@@ -18,13 +18,14 @@
 
 plasmoid.paintInterface = function(painter)
 {
-    rect = plasmoid.rect()
-    svg.resize(rect.width(), rect.height())
-    svg.paint(painter, rect.x(), rect.y())
+    rect = plasmoid.rect
+    svg.resize(rect.width, rect.height)
+    svg.paint(painter, rect.x, rect.y)
 
     if (drawLogo) {
         // draw the KDE logo centered
-        painter.drawPixmap(rect.x() + (rect.width() / 2 - p.rect().width() / 2),
-                           rect.y() + (rect.height() / 2 - p.rect().height() / 2), p)
+        painter.drawPixmap(rect.x + (rect.width / 2 - p.rect.width / 2),
+                           rect.y + (rect.height / 2 - p.rect.height / 2), p)
+
     }
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic