diff options
Diffstat (limited to 'utils/themeeditor/graphics/rbviewport.cpp')
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.cpp | 15 |
1 files changed, 11 insertions, 4 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 | { |