diff options
Diffstat (limited to 'utils/themeeditor')
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.cpp | 20 | ||||
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.h | 2 | ||||
-rw-r--r-- | utils/themeeditor/models/parsetreenode.cpp | 2 |
3 files changed, 9 insertions, 15 deletions
diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp index 2dd272927e..d4a8ede090 100644 --- a/utils/themeeditor/graphics/rbviewport.cpp +++ b/utils/themeeditor/graphics/rbviewport.cpp | |||
@@ -154,20 +154,14 @@ 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 | ||
157 | void RBViewport::newLine(bool force) | 157 | void RBViewport::newLine() |
158 | { | 158 | { |
159 | if(leftText.count() != 0 | 159 | textOffset.setY(textOffset.y() + lineHeight); |
160 | || centerText.count() != 0 | 160 | textOffset.setX(0); |
161 | || rightText.count() != 0 | 161 | textAlign = Left; |
162 | || force) | 162 | leftText.clear(); |
163 | { | 163 | rightText.clear(); |
164 | textOffset.setY(textOffset.y() + lineHeight); | 164 | centerText.clear(); |
165 | textOffset.setX(0); | ||
166 | textAlign = Left; | ||
167 | leftText.clear(); | ||
168 | rightText.clear(); | ||
169 | centerText.clear(); | ||
170 | } | ||
171 | } | 165 | } |
172 | 166 | ||
173 | void RBViewport::write(QString text) | 167 | void RBViewport::write(QString text) |
diff --git a/utils/themeeditor/graphics/rbviewport.h b/utils/themeeditor/graphics/rbviewport.h index ee7d0540eb..2aff315873 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(bool force = false); | 56 | void newLine(); |
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 8edbbe9b6c..d10bb08936 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(children.count() > 0 ? false : true); | 521 | viewport->newLine(); |
522 | } | 522 | } |
523 | else if(element->type == TEXT) | 523 | else if(element->type == TEXT) |
524 | { | 524 | { |