diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-07-11 04:36:05 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-07-11 04:36:05 +0000 |
commit | 364af4f5748556acef8a71742fe1b17062a6bb46 (patch) | |
tree | 371111c94b77e722c2f983517b905c04b47c5d62 | |
parent | a6df932003513a0811c9231475aa58c802cc4c80 (diff) | |
download | rockbox-364af4f5748556acef8a71742fe1b17062a6bb46.tar.gz rockbox-364af4f5748556acef8a71742fe1b17062a6bb46.zip |
Theme Editor: Fixed rendering behavior of default viewport. Now when other viewports are present in the skin, only _text_ from the default viewport is not rendered
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27378 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.cpp | 8 | ||||
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp index 4422f19b86..96d7e8b276 100644 --- a/utils/themeeditor/graphics/rbviewport.cpp +++ b/utils/themeeditor/graphics/rbviewport.cpp | |||
@@ -51,7 +51,7 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info) | |||
51 | if(info.model()->rowCount(QModelIndex()) > 1) | 51 | if(info.model()->rowCount(QModelIndex()) > 1) |
52 | { | 52 | { |
53 | /* If there is more than one viewport in the document */ | 53 | /* If there is more than one viewport in the document */ |
54 | setVisible(false); | 54 | textOffset.setX(-1); |
55 | } | 55 | } |
56 | else | 56 | else |
57 | { | 57 | { |
@@ -175,6 +175,9 @@ void RBViewport::paint(QPainter *painter, | |||
175 | 175 | ||
176 | void RBViewport::newLine() | 176 | void RBViewport::newLine() |
177 | { | 177 | { |
178 | if(textOffset.x() < 0) | ||
179 | return; | ||
180 | |||
178 | if(leftText != "") | 181 | if(leftText != "") |
179 | alignLeft(); | 182 | alignLeft(); |
180 | 183 | ||
@@ -201,6 +204,9 @@ void RBViewport::newLine() | |||
201 | 204 | ||
202 | void RBViewport::write(QString text) | 205 | void RBViewport::write(QString text) |
203 | { | 206 | { |
207 | if(textOffset.x() < 0) | ||
208 | return; | ||
209 | |||
204 | if(textAlign == Left) | 210 | if(textAlign == Left) |
205 | { | 211 | { |
206 | leftText.append(text); | 212 | leftText.append(text); |
diff --git a/utils/themeeditor/graphics/rbviewport.h b/utils/themeeditor/graphics/rbviewport.h index a9b706d95f..c665108618 100644 --- a/utils/themeeditor/graphics/rbviewport.h +++ b/utils/themeeditor/graphics/rbviewport.h | |||
@@ -64,6 +64,8 @@ public: | |||
64 | void addTextOffset(int height){ textOffset.setY(textOffset.y() + height); } | 64 | void addTextOffset(int height){ textOffset.setY(textOffset.y() + height); } |
65 | void flushText() | 65 | void flushText() |
66 | { | 66 | { |
67 | if(textOffset.x() < 0) | ||
68 | return; | ||
67 | alignLeft(); | 69 | alignLeft(); |
68 | alignRight(); | 70 | alignRight(); |
69 | alignCenter(); | 71 | alignCenter(); |