diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-07-06 19:19:11 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-07-06 19:19:11 +0000 |
commit | 39e252019f55dab3e6119cba92caf451c29aa92b (patch) | |
tree | 5c75ca0b516dba0cb012e05c53388caa91f8ef3a /utils/themeeditor/graphics/rbviewport.cpp | |
parent | 5de6ddcaa170cce4c0a2cd4b43aa76a4ef7ae175 (diff) | |
download | rockbox-39e252019f55dab3e6119cba92caf451c29aa92b.tar.gz rockbox-39e252019f55dab3e6119cba92caf451c29aa92b.zip |
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.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp index a92825362d..3b8a02dd87 100644 --- a/utils/themeeditor/graphics/rbviewport.cpp +++ b/utils/themeeditor/graphics/rbviewport.cpp | |||
@@ -30,8 +30,7 @@ | |||
30 | #include "skin_parser.h" | 30 | #include "skin_parser.h" |
31 | 31 | ||
32 | RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info) | 32 | RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info) |
33 | : QGraphicsItem(info.screen()), font(info.screen()->getFont(0)), | 33 | : QGraphicsItem(info.screen()), foreground(info.screen()->foreground()), |
34 | foreground(info.screen()->foreground()), | ||
35 | background(info.screen()->background()), textOffset(0,0), | 34 | background(info.screen()->background()), textOffset(0,0), |
36 | screen(info.screen()), textAlign(Left), showStatusBar(false), | 35 | screen(info.screen()), textAlign(Left), showStatusBar(false), |
37 | statusBarTexture(":/render/statusbar.png") | 36 | statusBarTexture(":/render/statusbar.png") |
@@ -42,6 +41,7 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info) | |||
42 | size = QRectF(0, 0, info.screen()->getWidth(), | 41 | size = QRectF(0, 0, info.screen()->getWidth(), |
43 | info.screen()->getHeight()); | 42 | info.screen()->getHeight()); |
44 | customUI = false; | 43 | customUI = false; |
44 | font = screen->getFont(1); | ||
45 | 45 | ||
46 | if(info.model()->rowCount(QModelIndex()) > 1) | 46 | if(info.model()->rowCount(QModelIndex()) > 1) |
47 | { | 47 | { |
@@ -120,6 +120,10 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info) | |||
120 | y -= screen->parentItem()->pos().y(); | 120 | y -= screen->parentItem()->pos().y(); |
121 | } | 121 | } |
122 | 122 | ||
123 | if(node->params[++param].type == skin_tag_parameter::DEFAULT) | ||
124 | font = screen->getFont(1); | ||
125 | else | ||
126 | font = screen->getFont(node->params[param].data.numeric); | ||
123 | 127 | ||
124 | setPos(x, y); | 128 | setPos(x, y); |
125 | size = QRectF(0, 0, w, h); | 129 | size = QRectF(0, 0, w, h); |