summaryrefslogtreecommitdiff
path: root/utils/themeeditor/graphics/rbviewport.cpp
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-07-06 19:19:11 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-07-06 19:19:11 +0000
commit39e252019f55dab3e6119cba92caf451c29aa92b (patch)
tree5c75ca0b516dba0cb012e05c53388caa91f8ef3a /utils/themeeditor/graphics/rbviewport.cpp
parent5de6ddcaa170cce4c0a2cd4b43aa76a4ef7ae175 (diff)
downloadrockbox-39e252019f55dab3e6119cba92caf451c29aa92b.zip
rockbox-39e252019f55dab3e6119cba92caf451c29aa92b.tar.gz
rockbox-39e252019f55dab3e6119cba92caf451c29aa92b.tar.bz2
rockbox-39e252019f55dab3e6119cba92caf451c29aa92b.tar.xz
Theme Editor: Rockbox FNT files now supported. Theme editor will currently load fonts from the current project directory, or use the built-in font if they're not present
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27318 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/graphics/rbviewport.cpp')
-rw-r--r--utils/themeeditor/graphics/rbviewport.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp
index a928253..3b8a02d 100644
--- a/utils/themeeditor/graphics/rbviewport.cpp
+++ b/utils/themeeditor/graphics/rbviewport.cpp
@@ -30,8 +30,7 @@
#include "skin_parser.h"
RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info)
- : QGraphicsItem(info.screen()), font(info.screen()->getFont(0)),
- foreground(info.screen()->foreground()),
+ : QGraphicsItem(info.screen()), foreground(info.screen()->foreground()),
background(info.screen()->background()), textOffset(0,0),
screen(info.screen()), textAlign(Left), showStatusBar(false),
statusBarTexture(":/render/statusbar.png")
@@ -42,6 +41,7 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info)
size = QRectF(0, 0, info.screen()->getWidth(),
info.screen()->getHeight());
customUI = false;
+ font = screen->getFont(1);
if(info.model()->rowCount(QModelIndex()) > 1)
{
@@ -120,6 +120,10 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info)
y -= screen->parentItem()->pos().y();
}
+ if(node->params[++param].type == skin_tag_parameter::DEFAULT)
+ font = screen->getFont(1);
+ else
+ font = screen->getFont(node->params[param].data.numeric);
setPos(x, y);
size = QRectF(0, 0, w, h);