summaryrefslogtreecommitdiffstats
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.tar.bz2
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,
void RBViewport::newLine()
{
+ if(leftText != "")
+ alignLeft();
+
+ if(centerText != "")
+ alignCenter();
+
+ if(rightText != "")
+ alignRight();
+
textOffset.setY(textOffset.y() + lineHeight);
textOffset.setX(0);
textAlign = Left;
@@ -189,17 +198,14 @@ void RBViewport::write(QString text)
if(textAlign == Left)
{
leftText.append(text);
- alignLeft();
}
else if(textAlign == Center)
{
centerText.append(text);
- alignCenter();
}
else if(textAlign == Right)
{
rightText.append(text);
- alignRight();
}
}