forked from len0rd/rockbox
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
This commit is contained in:
parent
e03d373957
commit
88145656fb
1 changed files with 9 additions and 3 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue