summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2011-03-20 04:20:13 +0000
committerRobert Bieber <robby@bieberphoto.com>2011-03-20 04:20:13 +0000
commit5c47872b9c91d28268ccd27c2890a5642550ad4d (patch)
tree20c7fcfbadd601de288c5485c6b7e9417a2df4e9
parentfa565048f6b6d1928a216246619ad52b607ac7c2 (diff)
downloadrockbox-5c47872b9c91d28268ccd27c2890a5642550ad4d.tar.gz
rockbox-5c47872b9c91d28268ccd27c2890a5642550ad4d.zip
Theme Editor: Made touch area position relative to enclosing viewports
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29618 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--utils/themeeditor/graphics/rbtoucharea.cpp4
-rw-r--r--utils/themeeditor/graphics/rbtoucharea.h2
-rw-r--r--utils/themeeditor/models/parsetreenode.cpp3
3 files changed, 5 insertions, 4 deletions
diff --git a/utils/themeeditor/graphics/rbtoucharea.cpp b/utils/themeeditor/graphics/rbtoucharea.cpp
index e41129a213..eee858e28f 100644
--- a/utils/themeeditor/graphics/rbtoucharea.cpp
+++ b/utils/themeeditor/graphics/rbtoucharea.cpp
@@ -28,8 +28,8 @@
28#include <QGraphicsSceneMouseEvent> 28#include <QGraphicsSceneMouseEvent>
29 29
30RBTouchArea::RBTouchArea(int width, int height, QString action, 30RBTouchArea::RBTouchArea(int width, int height, QString action,
31 const RBRenderInfo& info) 31 const RBRenderInfo& info, QGraphicsItem* parent)
32 : QGraphicsItem(info.screen()), 32 : QGraphicsItem(parent),
33 size(QRectF(0, 0, width, height)), action(action), 33 size(QRectF(0, 0, width, height)), action(action),
34 device(info.device()) 34 device(info.device())
35{ 35{
diff --git a/utils/themeeditor/graphics/rbtoucharea.h b/utils/themeeditor/graphics/rbtoucharea.h
index ccc3edb272..91d9ef24ac 100644
--- a/utils/themeeditor/graphics/rbtoucharea.h
+++ b/utils/themeeditor/graphics/rbtoucharea.h
@@ -31,7 +31,7 @@ class RBTouchArea : public QGraphicsItem
31{ 31{
32public: 32public:
33 RBTouchArea(int width, int height, QString action, 33 RBTouchArea(int width, int height, QString action,
34 const RBRenderInfo& info); 34 const RBRenderInfo& info, QGraphicsItem* parent = 0);
35 virtual ~RBTouchArea(); 35 virtual ~RBTouchArea();
36 36
37 QRectF boundingRect() const; 37 QRectF boundingRect() const;
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp
index 03f1b21444..1c7de7cc25 100644
--- a/utils/themeeditor/models/parsetreenode.cpp
+++ b/utils/themeeditor/models/parsetreenode.cpp
@@ -930,7 +930,8 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport)
930 int width = element->params[2].data.number; 930 int width = element->params[2].data.number;
931 int height = element->params[3].data.number; 931 int height = element->params[3].data.number;
932 QString action(element->params[4].data.text); 932 QString action(element->params[4].data.text);
933 RBTouchArea* temp = new RBTouchArea(width, height, action, info); 933 RBTouchArea* temp = new RBTouchArea(width, height, action, info,
934 viewport);
934 temp->setPos(x, y); 935 temp->setPos(x, y);
935 return true; 936 return true;
936 } 937 }