summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/themeeditor/graphics/rbviewport.cpp2
-rw-r--r--utils/themeeditor/graphics/rbviewport.h4
-rw-r--r--utils/themeeditor/models/parsetreenode.cpp8
3 files changed, 12 insertions, 2 deletions
diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp
index 70c50f21c1..5197c2edc6 100644
--- a/utils/themeeditor/graphics/rbviewport.cpp
+++ b/utils/themeeditor/graphics/rbviewport.cpp
@@ -34,7 +34,7 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info)
34 foreground(info.screen()->foreground()), 34 foreground(info.screen()->foreground()),
35 background(info.screen()->background()), textOffset(0,0), 35 background(info.screen()->background()), textOffset(0,0),
36 screen(info.screen()), textAlign(Left), showStatusBar(false), 36 screen(info.screen()), textAlign(Left), showStatusBar(false),
37 statusBarTexture(":/render/statusbar.png") 37 statusBarTexture(":/render/statusbar.png"), line(node->line)
38{ 38{
39 if(!node->tag) 39 if(!node->tag)
40 { 40 {
diff --git a/utils/themeeditor/graphics/rbviewport.h b/utils/themeeditor/graphics/rbviewport.h
index 624a9686da..37c642574f 100644
--- a/utils/themeeditor/graphics/rbviewport.h
+++ b/utils/themeeditor/graphics/rbviewport.h
@@ -66,6 +66,8 @@ public:
66 void showPlaylist(const RBRenderInfo& info, int start, skin_element* id3, 66 void showPlaylist(const RBRenderInfo& info, int start, skin_element* id3,
67 skin_element* noId3); 67 skin_element* noId3);
68 68
69 int declarationLine(){ return line; }
70
69private: 71private:
70 72
71 void alignLeft(); 73 void alignLeft();
@@ -91,6 +93,8 @@ private:
91 93
92 bool showStatusBar; 94 bool showStatusBar;
93 QPixmap statusBarTexture; 95 QPixmap statusBarTexture;
96
97 int line;
94}; 98};
95 99
96#endif // RBVIEWPORT_H 100#endif // RBVIEWPORT_H
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp
index 08ce703859..3a894a1678 100644
--- a/utils/themeeditor/models/parsetreenode.cpp
+++ b/utils/themeeditor/models/parsetreenode.cpp
@@ -518,7 +518,13 @@ void ParseTreeNode::render(const RBRenderInfo &info, RBViewport* viewport,
518 { 518 {
519 for(int i = 0; i < children.count(); i++) 519 for(int i = 0; i < children.count(); i++)
520 children[i]->render(info, viewport); 520 children[i]->render(info, viewport);
521 if(!noBreak) 521 /* TODO
522 * The second element of this if is a temporary hack to allow Vf and Vb
523 * tags in a viewport without forcing the first line of text down. A
524 * proper solution to this problem needs to be worked out in the parser
525 * as soon as possible
526 */
527 if(!noBreak && element->line != viewport->declarationLine())
522 viewport->newLine(); 528 viewport->newLine();
523 } 529 }
524 else if(element->type == TEXT) 530 else if(element->type == TEXT)