summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/graphics/rbviewport.cpp
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-07-02 05:17:57 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-07-02 05:17:57 +0000
commit14caf676424f2c2a5ce44c69d41862660fa71be6 (patch)
tree51d65bd3250fcf0afe55712cb5490ab83933d365 /utils/themeeditor/graphics/rbviewport.cpp
parente763eb73b844ee1bffa70aeb6d619dd23345a0ab (diff)
downloadrockbox-14caf676424f2c2a5ce44c69d41862660fa71be6.tar.gz
rockbox-14caf676424f2c2a5ce44c69d41862660fa71be6.tar.bz2
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/graphics/rbviewport.cpp')
-rw-r--r--utils/themeeditor/graphics/rbviewport.cpp15
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)
foreground(info.screen()->foreground()),
background(info.screen()->background()), textOffset(0,0),
screen(info.screen()), textAlign(Left), showStatusBar(false),
- statusBarTexture(":/render/statusbar.png"), line(node->line)
+ statusBarTexture(":/render/statusbar.png")
{
if(!node->tag)
{
@@ -187,17 +187,24 @@ void RBViewport::showPlaylist(const RBRenderInfo &info, int start,
skin_element *id3, skin_element *noId3)
{
/* Determining whether ID3 info is available */
- skin_element* root = info.device()->data("id3available").toBool()
- ? id3 : noId3;
+ skin_element* root = id3;
/* The line will be a linked list */
- root = root->children[0];
+ if(root->children_count > 0)
+ root = root->children[0];
int song = start + info.device()->data("pp").toInt();
int numSongs = info.device()->data("pe").toInt();
+ int halfWay = (numSongs - song) / 2 + 1 + song;
while(song <= numSongs && textOffset.y() + lineHeight < size.height())
{
+ if(song == halfWay)
+ {
+ root = noId3;
+ if(root->children_count > 0)
+ root = root->children[0];
+ }
skin_element* current = root;
while(current)
{