summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-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 138a6b52bc..2dd272927e 100644
--- a/utils/themeeditor/graphics/rbviewport.cpp
+++ b/utils/themeeditor/graphics/rbviewport.cpp
@@ -154,11 +154,12 @@ void RBViewport::paint(QPainter *painter,
154 painter->fillRect(QRectF(0, 0, size.width(), 8), statusBarTexture); 154 painter->fillRect(QRectF(0, 0, size.width(), 8), statusBarTexture);
155} 155}
156 156
157void RBViewport::newLine() 157void RBViewport::newLine(bool force)
158{ 158{
159 if(leftText.count() != 0 159 if(leftText.count() != 0
160 || centerText.count() != 0 160 || centerText.count() != 0
161 || rightText.count() != 0) 161 || rightText.count() != 0
162 || force)
162 { 163 {
163 textOffset.setY(textOffset.y() + lineHeight); 164 textOffset.setY(textOffset.y() + lineHeight);
164 textOffset.setX(0); 165 textOffset.setX(0);
diff --git a/utils/themeeditor/graphics/rbviewport.h b/utils/themeeditor/graphics/rbviewport.h
index 2aff315873..ee7d0540eb 100644
--- a/utils/themeeditor/graphics/rbviewport.h
+++ b/utils/themeeditor/graphics/rbviewport.h
@@ -53,7 +53,7 @@ public:
53 void makeCustomUI(){ customUI = true; } 53 void makeCustomUI(){ customUI = true; }
54 void clearCustomUI(){ customUI = false; } 54 void clearCustomUI(){ customUI = false; }
55 55
56 void newLine(); 56 void newLine(bool force = false);
57 void write(QString text); 57 void write(QString text);
58 void alignText(Alignment align){ textAlign = align; } 58 void alignText(Alignment align){ textAlign = align; }
59 59
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp
index fabb578316..6d712c80e7 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,
518 for(int i = 0; i < children.count(); i++) 518 for(int i = 0; i < children.count(); i++)
519 children[i]->render(info, viewport); 519 children[i]->render(info, viewport);
520 if(!noBreak) 520 if(!noBreak)
521 viewport->newLine(); 521 viewport->newLine(children.count() > 0 ? false : true);
522 } 522 }
523 else if(element->type == TEXT) 523 else if(element->type == TEXT)
524 { 524 {