diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-07-07 06:50:30 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-07-07 06:50:30 +0000 |
commit | 3214e3710ad0d73c1b775b8af002763cbb42382c (patch) | |
tree | 67355953e4e3079d0a3ab4ff688dfa6d413d6f36 /utils/themeeditor/graphics/rbfont.cpp | |
parent | ce5ee193d41061a6b8c9a2b87dc8a43303f82ab9 (diff) | |
download | rockbox-3214e3710ad0d73c1b775b8af002763cbb42382c.tar.gz rockbox-3214e3710ad0d73c1b775b8af002763cbb42382c.zip |
Theme Editor: Made all lines of text render as a single graphic, viewport size limits now enforced on text width
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27327 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/graphics/rbfont.cpp')
-rw-r--r-- | utils/themeeditor/graphics/rbfont.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/themeeditor/graphics/rbfont.cpp b/utils/themeeditor/graphics/rbfont.cpp index 1c2739d118..e8bff40e13 100644 --- a/utils/themeeditor/graphics/rbfont.cpp +++ b/utils/themeeditor/graphics/rbfont.cpp | |||
@@ -155,7 +155,8 @@ RBFont::~RBFont() | |||
155 | delete[] widthData; | 155 | delete[] widthData; |
156 | } | 156 | } |
157 | 157 | ||
158 | RBText* RBFont::renderText(QString text, QColor color, QGraphicsItem *parent) | 158 | RBText* RBFont::renderText(QString text, QColor color, int viewWidth, |
159 | QGraphicsItem *parent) | ||
159 | { | 160 | { |
160 | int firstChar = header.value("firstchar").toInt(); | 161 | int firstChar = header.value("firstchar").toInt(); |
161 | int height = header.value("height").toInt(); | 162 | int height = header.value("height").toInt(); |
@@ -221,6 +222,6 @@ RBText* RBFont::renderText(QString text, QColor color, QGraphicsItem *parent) | |||
221 | startX += widths[i]; | 222 | startX += widths[i]; |
222 | } | 223 | } |
223 | 224 | ||
224 | return new RBText(image, parent); | 225 | return new RBText(image, viewWidth, parent); |
225 | 226 | ||
226 | } | 227 | } |