mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
Theme Editor: Renderer now adds a newline after EVERY logical line in the parse tree
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27222 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a43fbbb9a3
commit
a54bfaa69e
3 changed files with 9 additions and 15 deletions
|
@ -154,20 +154,14 @@ void RBViewport::paint(QPainter *painter,
|
|||
painter->fillRect(QRectF(0, 0, size.width(), 8), statusBarTexture);
|
||||
}
|
||||
|
||||
void RBViewport::newLine(bool force)
|
||||
void RBViewport::newLine()
|
||||
{
|
||||
if(leftText.count() != 0
|
||||
|| centerText.count() != 0
|
||||
|| rightText.count() != 0
|
||||
|| force)
|
||||
{
|
||||
textOffset.setY(textOffset.y() + lineHeight);
|
||||
textOffset.setX(0);
|
||||
textAlign = Left;
|
||||
leftText.clear();
|
||||
rightText.clear();
|
||||
centerText.clear();
|
||||
}
|
||||
}
|
||||
|
||||
void RBViewport::write(QString text)
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
void makeCustomUI(){ customUI = true; }
|
||||
void clearCustomUI(){ customUI = false; }
|
||||
|
||||
void newLine(bool force = false);
|
||||
void newLine();
|
||||
void write(QString text);
|
||||
void alignText(Alignment align){ textAlign = align; }
|
||||
|
||||
|
|
|
@ -518,7 +518,7 @@ void ParseTreeNode::render(const RBRenderInfo &info, RBViewport* viewport,
|
|||
for(int i = 0; i < children.count(); i++)
|
||||
children[i]->render(info, viewport);
|
||||
if(!noBreak)
|
||||
viewport->newLine(children.count() > 0 ? false : true);
|
||||
viewport->newLine();
|
||||
}
|
||||
else if(element->type == TEXT)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue