From 15488a00eae8d10249015b88e4b7bdc47365b854 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Thu, 15 Jul 2010 06:24:11 +0000 Subject: Theme Editor: Committed FS#11477 to add a DECIMAL parameter type in the parser and adapt the Theme Editor to accomodate the change by Johnathan Gordon. Fixed bug in the parser caused by the patch (error was thrown on zero value) and adapted tag rendering for new format git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27426 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/graphics/rbprogressbar.cpp | 8 ++++---- utils/themeeditor/graphics/rbviewport.cpp | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'utils/themeeditor/graphics') diff --git a/utils/themeeditor/graphics/rbprogressbar.cpp b/utils/themeeditor/graphics/rbprogressbar.cpp index 027520f4da..206a835252 100644 --- a/utils/themeeditor/graphics/rbprogressbar.cpp +++ b/utils/themeeditor/graphics/rbprogressbar.cpp @@ -41,22 +41,22 @@ RBProgressBar::RBProgressBar(RBViewport *parent, const RBRenderInfo &info, if(paramCount > 0 && params[0].type != skin_tag_parameter::DEFAULT) { - x = params[0].data.numeric; + x = params[0].data.number; } if(paramCount > 1 && params[1].type != skin_tag_parameter::DEFAULT) { - y = params[1].data.numeric; + y = params[1].data.number; } if(paramCount > 2 && params[2].type != skin_tag_parameter::DEFAULT) { - w = params[2].data.numeric; + w = params[2].data.number; } if(paramCount > 3 && params[3].type != skin_tag_parameter::DEFAULT) { - h = params[3].data.numeric; + h = params[3].data.number; } if(paramCount > 4 && params[4].type != skin_tag_parameter::DEFAULT) diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp index 96d7e8b276..e9c58eb6fb 100644 --- a/utils/themeeditor/graphics/rbviewport.cpp +++ b/utils/themeeditor/graphics/rbviewport.cpp @@ -97,24 +97,24 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info) break; } /* Now we grab the info common to all viewports */ - x = node->params[param++].data.numeric; + x = node->params[param++].data.number; if(x < 0) x = info.screen()->boundingRect().right() + x; - y = node->params[param++].data.numeric; + y = node->params[param++].data.number; 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; + w = node->params[param].data.number; 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; + h = node->params[param].data.number; if(h < 0) h = info.screen()->getHeight() + h - y; @@ -128,7 +128,7 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info) if(node->params[++param].type == skin_tag_parameter::DEFAULT) font = screen->getFont(1); else - font = screen->getFont(node->params[param].data.numeric); + font = screen->getFont(node->params[param].data.number); setPos(x, y); size = QRectF(0, 0, w, h); -- cgit