summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/models
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-30 19:35:00 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-30 19:35:00 +0000
commit8114979e8e413caa876cda626fe0b6385bfc56ce (patch)
tree7b1a193dfbbc48941b93d7c5e2f21199d5bd2979 /utils/themeeditor/models
parent3e599f4d379aeaa7ce5861c9818028e6d02d4490 (diff)
downloadrockbox-8114979e8e413caa876cda626fe0b6385bfc56ce.tar.gz
rockbox-8114979e8e413caa876cda626fe0b6385bfc56ce.tar.bz2
rockbox-8114979e8e413caa876cda626fe0b6385bfc56ce.zip
Theme Editor: Added album art display
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27199 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/models')
-rw-r--r--utils/themeeditor/models/parsetreenode.cpp42
1 files changed, 35 insertions, 7 deletions
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp
index c56592e2de..3b334a6f99 100644
--- a/utils/themeeditor/models/parsetreenode.cpp
+++ b/utils/themeeditor/models/parsetreenode.cpp
@@ -582,8 +582,8 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport)
QString filename;
QString id;
- int x, y, tiles, tile;
- char c;
+ int x, y, tiles, tile, maxWidth, maxHeight, width, height;
+ char c, hAlign, vAlign;
RBImage* image;
/* Two switch statements to narrow down the tag name */
@@ -609,7 +609,7 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport)
return true;
}
- break;
+ return false;
case 'x':
switch(element->tag->name[1])
@@ -672,7 +672,35 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport)
}
- return true;
+ return false;
+
+ case 'C':
+ switch(element->tag->name[1])
+ {
+ case 'd':
+ /* %Cd */
+ info.screen()->showAlbumArt(viewport);
+ return true;
+
+ case 'l':
+ /* %Cl */
+ x = element->params[0].data.numeric;
+ y = element->params[1].data.numeric;
+ maxWidth = element->params[2].data.numeric;
+ maxHeight = element->params[3].data.numeric;
+ hAlign = element->params_count > 4
+ ? element->params[4].data.text[0] : 'c';
+ vAlign = element->params_count > 5
+ ? element->params[5].data.text[0] : 'c';
+ width = info.device()->data("artwidth").toInt();
+ height = info.device()->data("artheight").toInt();
+ info.screen()->setAlbumArt(new RBAlbumArt(viewport, x, y, maxWidth,
+ maxHeight, width, height,
+ hAlign, vAlign));
+ return true;
+ }
+
+ return false;
case 'F':
@@ -689,7 +717,7 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport)
}
- return true;
+ return false;
case 'V':
@@ -725,7 +753,7 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport)
}
- return true;
+ return false;
case 'X':
@@ -738,7 +766,7 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport)
return true;
}
- return true;
+ return false;
}