Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: bzavala on February 25, 2008, 06:31:55 PM

Title: Album art image displays blank lines...
Post by: bzavala on February 25, 2008, 06:31:55 PM
Hi!

Last week I decided to create a new theme for the iPod 320x240 using viewports and it did work fine. But then I tried to port that to use the old (current) WPS format to use it with the current build, and now I am getting blank lines on top of my album art image.

I can't figure out what is wrong with my code. I have tried moving around some of the tags and still get the same problem. One thing though, is that I am using a 200x200 size album art. At first I thought that could be the problem, but changing the size to 100x100 algo shows the blank lines.

Today I installed r16421 and the issue still happens. Then I went back to r15983 from 071231 and the issue also happens, so it's not a bug (I think). It has to be something in the code and I can't figure it out. Other themes work just fine.

I am attaching a screendump. Next post will have the WPS code in case anyone wants to take a quick look...

Thanks in advance!! :D


Ben
Title: Re: Album art image displays blank lines...
Post by: bzavala on February 25, 2008, 06:42:49 PM
i had to double post to attach the wps file (renamed it as a text file).
Title: Re: Album art image displays blank lines...
Post by: MarcGuay on February 25, 2008, 07:30:40 PM
Read Chronon's post here:

http://forums.rockbox.org/index.php?topic=14476.msg108954#msg108954

Makes sense, though I thought there was a workaround for this.  It explains, at least, why the line with the song index isn't having the same effect.  I know that if you use the margin tag you can put info to the right of things without blocking out images to the left of it (like cabbiev2).  

Check this thread as well, I think I managed to help this guy display similar information on the same line as an image by rearranging the order things were  loaded in:

http://forums.rockbox.org/index.php?topic=15034.0

But to be honest, I just tried to do it myself in the simulator and had no such luck...

Title: Re: Album art image displays blank lines...
Post by: NicolasP on February 26, 2008, 06:27:03 AM
You can make the alum art redraw more often by putting the %C tag in a "dynamic" conditional  (on both sides of it)
Title: Re: Album art image displays blank lines...
Post by: knight4led on February 26, 2008, 04:13:02 PM
I didn't read your WPS file to see if you were doing it or not, but I had this problem at first and managed to fix it. It turns out that nearly everything, including most images inside conditionals need to get thrown into a viewport. The major exception being the progress bar, which will not work if inside a viewport. Look over your WPS and see if that is the case, because I know that fixed it for my WPS files.

http://forums.rockbox.org/index.php?topic=12742.240
check out that link for some details.
Title: Re: Album art image displays blank lines...
Post by: MarcGuay on February 26, 2008, 04:19:16 PM
I think we're talking about the official build, which doesn't have the viewports feature implemented yet.
Title: Re: Album art image displays blank lines...
Post by: pixelma on February 26, 2008, 04:38:31 PM
I also had the impression the original poster specifially did not want to use viewports.

Actually I wanted to add something to NicolasP's suggestion. In my WPS I use something similar (some info like playlist position and elapsed time is to the left of the album art if present and only on "hold"). This is what NicolsP meant and what makes it work by drawing the picture more often. Maybe it'll also drain the battery more quickly - I can't give any numbers though.

That means you can put it in a conditional and if you still always want to let it show, use it in every part. This way the conditional will be evaluated but it doesn't matter which is true. For example:
Code: [Select]
%?mh<%C|%C>

Title: Re: Album art image displays blank lines...
Post by: bzavala on February 26, 2008, 05:34:04 PM

Thanks so much for replying!

@ Nicolas P: I will try out using the %C for the false conditional but I also feel that doing that would drain the battery faster?

@ Knight4led: Using viewports works fine.. no issues.. it's just that it's not commited yet, so I wanted to port the theme to the current code.

@ Pixelma... I'll give that a try as well...

Playing with it a little bit more last night, I found out that using the margin tag (%m) I can align the texts to the right side of the album art image. I also tried but it did not work for the left side (which you wouldn't need it anyways).

So what I did is I took out the volume and battery texts out of the left side of the album art, and only left the volume and battery levels icons, and the playlist track count and time texts to the right of the album art.

Thanks again!

Ben