diff options
| author | Robert Bieber <robby@bieberphoto.com> | 2010-07-01 02:07:41 +0000 |
|---|---|---|
| committer | Robert Bieber <robby@bieberphoto.com> | 2010-07-01 02:07:41 +0000 |
| commit | 8cd51a70c58afc67136d889400a0aafe68107ff1 (patch) | |
| tree | d9907f78240394fea2784287e349e7017fadc989 /utils/themeeditor/graphics | |
| parent | 82618e82e6f23d67d2da4560288f7e1f1079813b (diff) | |
| download | rockbox-8cd51a70c58afc67136d889400a0aafe68107ff1.zip rockbox-8cd51a70c58afc67136d889400a0aafe68107ff1.tar.gz rockbox-8cd51a70c58afc67136d889400a0aafe68107ff1.tar.bz2 rockbox-8cd51a70c58afc67136d889400a0aafe68107ff1.tar.xz | |
Theme Editor: Implemented negative x/y/w/h values in viewport declarations
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27205 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/graphics')
| -rw-r--r-- | utils/themeeditor/graphics/rbviewport.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp index 4b85a30..138a6b5 100644 --- a/utils/themeeditor/graphics/rbviewport.cpp +++ b/utils/themeeditor/graphics/rbviewport.cpp @@ -93,17 +93,25 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info) } /* Now we grab the info common to all viewports */ x = node->params[param++].data.numeric; + if(x < 0) + x = info.screen()->boundingRect().right() + x; y = node->params[param++].data.numeric; + if(y < 0) + y = info.screen()->boundingRect().bottom() + y; if(node->params[param].type == skin_tag_parameter::DEFAULT) w = info.screen()->getWidth() - x; else w = node->params[param].data.numeric; + if(w < 0) + w = info.screen()->getWidth() + w - x; if(node->params[++param].type == skin_tag_parameter::DEFAULT) h = info.screen()->getHeight() - y; else h = node->params[param].data.numeric; + if(h < 0) + h = info.screen()->getHeight() + h - y; setPos(x, y); size = QRectF(0, 0, w, h); |