summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/models
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-29 20:39:45 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-29 20:39:45 +0000
commit9d6b5d63175168e427de1cad85c9d8ae4020b7c0 (patch)
tree374a815fc18ea40985437e255508639afdfbd41f /utils/themeeditor/models
parent5565a28c7d9cf6217f5b85b3e078e74a3722175e (diff)
downloadrockbox-9d6b5d63175168e427de1cad85c9d8ae4020b7c0.tar.gz
rockbox-9d6b5d63175168e427de1cad85c9d8ae4020b7c0.zip
Theme Editor: Stopped conditionals and sublines from triggering newlines and made combo boxes in config panel return text if not used in a conditional
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27184 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/models')
-rw-r--r--utils/themeeditor/models/parsetreenode.cpp10
-rw-r--r--utils/themeeditor/models/parsetreenode.h3
2 files changed, 8 insertions, 5 deletions
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp
index a2781d237d..6c20a1d62e 100644
--- a/utils/themeeditor/models/parsetreenode.cpp
+++ b/utils/themeeditor/models/parsetreenode.cpp
@@ -510,13 +510,15 @@ void ParseTreeNode::render(const RBRenderInfo& info)
}
/* This version is called for logical lines, tags, conditionals and such */
-void ParseTreeNode::render(const RBRenderInfo &info, RBViewport* viewport)
+void ParseTreeNode::render(const RBRenderInfo &info, RBViewport* viewport,
+ bool noBreak)
{
if(element->type == LINE)
{
for(int i = 0; i < children.count(); i++)
children[i]->render(info, viewport);
- viewport->newLine();
+ if(!noBreak)
+ viewport->newLine();
}
else if(element->type == TEXT)
{
@@ -530,7 +532,7 @@ void ParseTreeNode::render(const RBRenderInfo &info, RBViewport* viewport)
else if(element->type == CONDITIONAL)
{
int child = evalTag(info, true, element->children_count).toInt();
- children[child]->render(info, viewport);
+ children[child]->render(info, viewport, true);
}
else if(element->type == SUBLINES)
{
@@ -571,7 +573,7 @@ void ParseTreeNode::render(const RBRenderInfo &info, RBViewport* viewport)
/* ...and finally render the selected branch */
if(branch >= 0)
- children[branch]->render(info, viewport);
+ children[branch]->render(info, viewport, true);
}
}
diff --git a/utils/themeeditor/models/parsetreenode.h b/utils/themeeditor/models/parsetreenode.h
index 7d7154aba8..82ede05908 100644
--- a/utils/themeeditor/models/parsetreenode.h
+++ b/utils/themeeditor/models/parsetreenode.h
@@ -60,7 +60,8 @@ public:
}
void render(const RBRenderInfo& info);
- void render(const RBRenderInfo &info, RBViewport* viewport);
+ void render(const RBRenderInfo &info, RBViewport* viewport,
+ bool noBreak = false);
double findBranchTime(ParseTreeNode* branch, const RBRenderInfo& info);
double findConditionalTime(ParseTreeNode* conditional,