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 | |
| parent | e03d37395766cec8daf1605d0fc514818a13c8a1 (diff) | |
| download | rockbox-88145656fb9b3276893e617b21bc590bc49fe96a.zip rockbox-88145656fb9b3276893e617b21bc590bc49fe96a.tar.gz rockbox-88145656fb9b3276893e617b21bc590bc49fe96a.tar.bz2 rockbox-88145656fb9b3276893e617b21bc590bc49fe96a.tar.xz | |
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')
| -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 77fe346..18029a5 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(); } } |