diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-07-07 07:49:00 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-07-07 07:49:00 +0000 |
commit | 88145656fb9b3276893e617b21bc590bc49fe96a (patch) | |
tree | b28d3f61e1ab363390befecefe97abd2444efebb /utils/themeeditor/graphics | |
parent | e03d37395766cec8daf1605d0fc514818a13c8a1 (diff) | |
download | rockbox-88145656fb9b3276893e617b21bc590bc49fe96a.tar.gz rockbox-88145656fb9b3276893e617b21bc590bc49fe96a.zip |
Theme Editor: Delaying rendering of text lines until newline reached
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27330 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/graphics')
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp index 77fe346090..18029a57f6 100644 --- a/utils/themeeditor/graphics/rbviewport.cpp +++ b/utils/themeeditor/graphics/rbviewport.cpp | |||
@@ -171,6 +171,15 @@ void RBViewport::paint(QPainter *painter, | |||
171 | 171 | ||
172 | void RBViewport::newLine() | 172 | void RBViewport::newLine() |
173 | { | 173 | { |
174 | if(leftText != "") | ||
175 | alignLeft(); | ||
176 | |||
177 | if(centerText != "") | ||
178 | alignCenter(); | ||
179 | |||
180 | if(rightText != "") | ||
181 | alignRight(); | ||
182 | |||
174 | textOffset.setY(textOffset.y() + lineHeight); | 183 | textOffset.setY(textOffset.y() + lineHeight); |
175 | textOffset.setX(0); | 184 | textOffset.setX(0); |
176 | textAlign = Left; | 185 | textAlign = Left; |
@@ -189,17 +198,14 @@ void RBViewport::write(QString text) | |||
189 | if(textAlign == Left) | 198 | if(textAlign == Left) |
190 | { | 199 | { |
191 | leftText.append(text); | 200 | leftText.append(text); |
192 | alignLeft(); | ||
193 | } | 201 | } |
194 | else if(textAlign == Center) | 202 | else if(textAlign == Center) |
195 | { | 203 | { |
196 | centerText.append(text); | 204 | centerText.append(text); |
197 | alignCenter(); | ||
198 | } | 205 | } |
199 | else if(textAlign == Right) | 206 | else if(textAlign == Right) |
200 | { | 207 | { |
201 | rightText.append(text); | 208 | rightText.append(text); |
202 | alignRight(); | ||
203 | } | 209 | } |
204 | } | 210 | } |
205 | 211 | ||