summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-08-13 06:04:32 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-08-13 06:04:32 +0000
commit6dd974a7a3e1f42ba66ece2a9bb39560da8f50f5 (patch)
tree28f36b8be7474daf9abb3bbc997ae53fec4447ab /utils
parentb477463d9c85d6dbb57e2688a1fec00c8af147b1 (diff)
downloadrockbox-6dd974a7a3e1f42ba66ece2a9bb39560da8f50f5.tar.gz
rockbox-6dd974a7a3e1f42ba66ece2a9bb39560da8f50f5.tar.bz2
rockbox-6dd974a7a3e1f42ba66ece2a9bb39560da8f50f5.zip
Theme Editor: Enabled __list_icons__ special file name for %xl tags
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27799 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils')
-rw-r--r--utils/themeeditor/models/parsetreenode.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp
index ad80ac6f2e..cd50718a52 100644
--- a/utils/themeeditor/models/parsetreenode.cpp
+++ b/utils/themeeditor/models/parsetreenode.cpp
@@ -640,6 +640,7 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport)
int x, y, tiles, tile, maxWidth, maxHeight, width, height;
char c, hAlign, vAlign;
RBImage* image;
+ QPixmap temp;
/* Two switch statements to narrow down the tag name */
switch(element->tag->name[0])
@@ -774,14 +775,27 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport)
case 'l':
/* %xl */
id = element->params[0].data.text;
- filename = info.settings()->value("imagepath", "") + "/" +
- element->params[1].data.text;
+ if(element->params[1].data.text == QString("__list_icons__"))
+ {
+ filename = info.settings()->value("iconset", "");
+ filename.replace(".rockbox",
+ info.settings()->value("themebase"));
+ temp.load(filename);
+ if(!temp.isNull())
+ {
+ tiles = temp.height() / temp.width();
+ }
+ }
+ else
+ {
+ filename = info.settings()->value("imagepath", "") + "/" +
+ element->params[1].data.text;
+ tiles = 1;
+ }
x = element->params[2].data.number;
y = element->params[3].data.number;
if(element->params_count > 4)
tiles = element->params[4].data.number;
- else
- tiles = 1;
info.screen()->loadImage(id, new RBImage(filename, tiles, x, y,
this, viewport));