summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-07-07 07:49:00 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-07-07 07:49:00 +0000
commit88145656fb9b3276893e617b21bc590bc49fe96a (patch)
treeb28d3f61e1ab363390befecefe97abd2444efebb
parente03d37395766cec8daf1605d0fc514818a13c8a1 (diff)
downloadrockbox-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
-rw-r--r--utils/themeeditor/graphics/rbviewport.cpp12
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
172void RBViewport::newLine() 172void 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