summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();
}
}