Theme Editor: Fixed image display relative to viewport
authorbieber <bieber@a1c6a512-1295-4272-9138-f99709370657>
Wed, 23 Jun 2010 07:23:47 +0000 (23 07:23 +0000)
committerbieber <bieber@a1c6a512-1295-4272-9138-f99709370657>
Wed, 23 Jun 2010 07:23:47 +0000 (23 07:23 +0000)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27084 a1c6a512-1295-4272-9138-f99709370657

utils/themeeditor/graphics/rbimage.cpp
utils/themeeditor/graphics/rbviewport.cpp

index 16e6bcb..f15d1ed 100644 (file)
@@ -44,7 +44,8 @@ RBImage::RBImage(QString file, int tiles, int x, int y, QGraphicsItem* parent)
 
         }
 
-        size = QRectF(x, y, image->width(), image->height() / tiles);
+        size = QRectF(0, 0, image->width(), image->height() / tiles);
+        setPos(x, y);
 
     }
     else
index 3a20175..c5b88b3 100644 (file)
@@ -100,7 +100,8 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info)
         else
             h = node->params[param].data.numeric;
 
-        size = QRectF(x, y, w, h);
+        setPos(x, y);
+        size = QRectF(0, 0, w, h);
     }
 }