summaryrefslogtreecommitdiff
path: root/utils/themeeditor
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor')
-rw-r--r--utils/themeeditor/graphics/rbviewport.cpp5
-rw-r--r--utils/themeeditor/graphics/rbviewport.h2
-rw-r--r--utils/themeeditor/models/parsetreenode.cpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp
index 138a6b5..2dd2729 100644
--- a/utils/themeeditor/graphics/rbviewport.cpp
+++ b/utils/themeeditor/graphics/rbviewport.cpp
@@ -154,11 +154,12 @@ void RBViewport::paint(QPainter *painter,
painter->fillRect(QRectF(0, 0, size.width(), 8), statusBarTexture);
}
-void RBViewport::newLine()
+void RBViewport::newLine(bool force)
{
if(leftText.count() != 0
|| centerText.count() != 0
- || rightText.count() != 0)
+ || rightText.count() != 0
+ || force)
{
textOffset.setY(textOffset.y() + lineHeight);
textOffset.setX(0);
diff --git a/utils/themeeditor/graphics/rbviewport.h b/utils/themeeditor/graphics/rbviewport.h
index 2aff315..ee7d054 100644
--- a/utils/themeeditor/graphics/rbviewport.h
+++ b/utils/themeeditor/graphics/rbviewport.h
@@ -53,7 +53,7 @@ public:
void makeCustomUI(){ customUI = true; }
void clearCustomUI(){ customUI = false; }
- void newLine();
+ void newLine(bool force = false);
void write(QString text);
void alignText(Alignment align){ textAlign = align; }
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp
index fabb578..6d712c8 100644
--- a/utils/themeeditor/models/parsetreenode.cpp
+++ b/utils/themeeditor/models/parsetreenode.cpp
@@ -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();
+ viewport->newLine(children.count() > 0 ? false : true);
}
else if(element->type == TEXT)
{