diff options
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.cpp | 2 | ||||
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.h | 4 | ||||
-rw-r--r-- | utils/themeeditor/models/parsetreenode.cpp | 8 |
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) foreground(info.screen()->foreground()), background(info.screen()->background()), textOffset(0,0), screen(info.screen()), textAlign(Left), showStatusBar(false), - statusBarTexture(":/render/statusbar.png") + statusBarTexture(":/render/statusbar.png"), line(node->line) { if(!node->tag) { 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: void showPlaylist(const RBRenderInfo& info, int start, skin_element* id3, skin_element* noId3); + int declarationLine(){ return line; } + private: void alignLeft(); @@ -91,6 +93,8 @@ private: bool showStatusBar; QPixmap statusBarTexture; + + int line; }; #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, { for(int i = 0; i < children.count(); i++) children[i]->render(info, viewport); - if(!noBreak) + /* TODO + * The second element of this if is a temporary hack to allow Vf and Vb + * tags in a viewport without forcing the first line of text down. A + * proper solution to this problem needs to be worked out in the parser + * as soon as possible + */ + if(!noBreak && element->line != viewport->declarationLine()) viewport->newLine(); } else if(element->type == TEXT) |