diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-07-02 05:17:57 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-07-02 05:17:57 +0000 |
commit | 14caf676424f2c2a5ce44c69d41862660fa71be6 (patch) | |
tree | 51d65bd3250fcf0afe55712cb5490ab83933d365 /utils/themeeditor | |
parent | e763eb73b844ee1bffa70aeb6d619dd23345a0ab (diff) | |
download | rockbox-14caf676424f2c2a5ce44c69d41862660fa71be6.tar.gz rockbox-14caf676424f2c2a5ce44c69d41862660fa71be6.zip |
Theme Editor: Switched the last two parameters of the Vp tag back to their original orientation, made the playlist display the first half with ID3 info, the second half without, as if the list were mid-way through loading
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27234 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor')
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.cpp | 15 | ||||
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.h | 4 | ||||
-rw-r--r-- | utils/themeeditor/models/parsetreenode.cpp | 12 | ||||
-rw-r--r-- | utils/themeeditor/resources/deviceoptions | 1 |
4 files changed, 14 insertions, 18 deletions
diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp index 5197c2edc6..a2e7bf49d3 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"), line(node->line) | 37 | statusBarTexture(":/render/statusbar.png") |
38 | { | 38 | { |
39 | if(!node->tag) | 39 | if(!node->tag) |
40 | { | 40 | { |
@@ -187,17 +187,24 @@ void RBViewport::showPlaylist(const RBRenderInfo &info, int start, | |||
187 | skin_element *id3, skin_element *noId3) | 187 | skin_element *id3, skin_element *noId3) |
188 | { | 188 | { |
189 | /* Determining whether ID3 info is available */ | 189 | /* Determining whether ID3 info is available */ |
190 | skin_element* root = info.device()->data("id3available").toBool() | 190 | skin_element* root = id3; |
191 | ? id3 : noId3; | ||
192 | 191 | ||
193 | /* The line will be a linked list */ | 192 | /* The line will be a linked list */ |
194 | root = root->children[0]; | 193 | if(root->children_count > 0) |
194 | root = root->children[0]; | ||
195 | 195 | ||
196 | int song = start + info.device()->data("pp").toInt(); | 196 | int song = start + info.device()->data("pp").toInt(); |
197 | int numSongs = info.device()->data("pe").toInt(); | 197 | int numSongs = info.device()->data("pe").toInt(); |
198 | int halfWay = (numSongs - song) / 2 + 1 + song; | ||
198 | 199 | ||
199 | while(song <= numSongs && textOffset.y() + lineHeight < size.height()) | 200 | while(song <= numSongs && textOffset.y() + lineHeight < size.height()) |
200 | { | 201 | { |
202 | if(song == halfWay) | ||
203 | { | ||
204 | root = noId3; | ||
205 | if(root->children_count > 0) | ||
206 | root = root->children[0]; | ||
207 | } | ||
201 | skin_element* current = root; | 208 | skin_element* current = root; |
202 | while(current) | 209 | while(current) |
203 | { | 210 | { |
diff --git a/utils/themeeditor/graphics/rbviewport.h b/utils/themeeditor/graphics/rbviewport.h index 37c642574f..624a9686da 100644 --- a/utils/themeeditor/graphics/rbviewport.h +++ b/utils/themeeditor/graphics/rbviewport.h | |||
@@ -66,8 +66,6 @@ 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 | |||
71 | private: | 69 | private: |
72 | 70 | ||
73 | void alignLeft(); | 71 | void alignLeft(); |
@@ -93,8 +91,6 @@ private: | |||
93 | 91 | ||
94 | bool showStatusBar; | 92 | bool showStatusBar; |
95 | QPixmap statusBarTexture; | 93 | QPixmap statusBarTexture; |
96 | |||
97 | int line; | ||
98 | }; | 94 | }; |
99 | 95 | ||
100 | #endif // RBVIEWPORT_H | 96 | #endif // RBVIEWPORT_H |
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp index f786819b17..08ce703859 100644 --- a/utils/themeeditor/models/parsetreenode.cpp +++ b/utils/themeeditor/models/parsetreenode.cpp | |||
@@ -518,13 +518,7 @@ 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 | /* TODO | 521 | if(!noBreak) |
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()) | ||
528 | viewport->newLine(); | 522 | viewport->newLine(); |
529 | } | 523 | } |
530 | else if(element->type == TEXT) | 524 | else if(element->type == TEXT) |
@@ -787,8 +781,8 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport) | |||
787 | case 'p': | 781 | case 'p': |
788 | /* %Vp */ | 782 | /* %Vp */ |
789 | viewport->showPlaylist(info, element->params[0].data.numeric, | 783 | viewport->showPlaylist(info, element->params[0].data.numeric, |
790 | element->params[2].data.code, | 784 | element->params[1].data.code, |
791 | element->params[1].data.code); | 785 | element->params[2].data.code); |
792 | return true; | 786 | return true; |
793 | 787 | ||
794 | case 'I': | 788 | case 'I': |
diff --git a/utils/themeeditor/resources/deviceoptions b/utils/themeeditor/resources/deviceoptions index 5417ca6b2d..10a1a89d75 100644 --- a/utils/themeeditor/resources/deviceoptions +++ b/utils/themeeditor/resources/deviceoptions | |||
@@ -114,7 +114,6 @@ ra ; Autoscore ; spin(0,10) ; 7 | |||
114 | ?C ; Album Art Available ; check ; true | 114 | ?C ; Album Art Available ; check ; true |
115 | artwidth ; Album Art Width ; spin(0,500) ; 100 | 115 | artwidth ; Album Art Width ; spin(0,500) ; 100 |
116 | artheight; Album Art Height ; spin(0,500) ; 100 | 116 | artheight; Album Art Height ; spin(0,500) ; 100 |
117 | id3available ; ID3 Info Available ; check ; true | ||
118 | 117 | ||
119 | [Hardware Status] | 118 | [Hardware Status] |
120 | bl ; Battery Level (-1 for unknown) ; spin(-1,100) ; 50 | 119 | bl ; Battery Level (-1 for unknown) ; spin(-1,100) ; 50 |