Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Annoying text over image problem with theme
« previous next »
  • Print
Pages: [1] 2

Author Topic: Annoying text over image problem with theme  (Read 5100 times)

Offline jgrg1

  • Member
  • *
  • Posts: 18
Annoying text over image problem with theme
« on: January 19, 2008, 08:23:19 PM »
Hi,

I just installed Rockbox on my E280 (best move ever!) and decided to modify the Sector theme to include more information. My problem can be seen in the attached screenshot on the bottom left. Here, I have set up a bunch of icons that will switch on/off depending on whether certain DSP modes are set (i.e. replay gain, crossfade, etc). I should point out that faded versions of the icons appear on the background image, and the icon images themselves "glow" more brightly. The icon images are also attached (in jpg form).

The key part of the .wps file in question is on line 85 where I cycle through the different battery levels every 10 seconds (so it cycles between estimated battery time, % battery level and Battery voltage). The text should be right aligned and I'm using some spaces to push the text away from the right-hand margin:

# Battery level and images
%ar%bt                    %t10;%ar%?bl<--|%bl%%>                    %t10;%ar%bvV                    %t10
#
# Other image conditionals go here for progress & volume
#
# Crossfade - Off|Shuffle|Track Skip|Always
%?xf<|%xdx>
#
# Replaygain - Off|Track|Album|TrackShuffle|AlbumShuffle|NoTag
%?rg<|%xdz>
#
%xdw%xdy%xdw

The %xdw%xdy%xdw line is just to switch the remaining images on. You'll notice in the attached screenshot that there appears to be a strip through the middle of the w,x,y and z images where the image is not displaying. I can only think that this is something to do with text overwriting images, but I'm using a Right Align tag and the spaces should technically be over the battery level image.

I've also tried using a left margin tag instead of right aligning the text, i.e.

   %m|95|%bt%t10;%m|115|%?bl<--|%bl%%>%t10;%m|95|%bvV%t10

But the same problem occurs.

Any help would be greatly appreciated. It's very odd.

Regards
Justin

PS. Just to clarify, I'm using an unmodified version of Rockbox, and it's not a buffer size issue, since if I remove the battery text all the images display correctly.

* screenshot.jpg (47.81 kB, 178x220 - viewed 200 times.)

* crossfade.jpg (13.91 kB, 21x18 - viewed 435 times.)

* replaygain.jpg (14 kB, 19x20 - viewed 429 times.)
« Last Edit: January 20, 2008, 09:46:26 AM by jgrg1 »
Logged

Offline pixelma

  • Rockbox Expert
  • Member
  • *
  • Posts: 645
Re: Annoying text over image problem with theme
« Reply #1 on: January 20, 2008, 12:44:02 PM »
I'd probably work with a left margin which I think would solve this problem and would also make sure that the text would never be above the last icon, possibly get rid of the right alignment with spaces (but you can also keep it). As far as I know you would need the definition in each alternating subline but please read more on the CustomWPS page in the wiki which is a good and quite up to date source of information.

Edit: Oh sorry, just read your edit now again (after I answered) and realised that you already tried the left margin solution - I have no other idea at the moment.... :-\ This happens when you first read and want to reply and then the actual writing of the reply is delayed for some reason.
« Last Edit: January 20, 2008, 04:47:17 PM by pixelma »
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Annoying text over image problem with theme
« Reply #2 on: January 20, 2008, 01:19:07 PM »
- It's interesting how the crossfade image isn't being affected like the others?

- If you remove the %t codes from that line and just display some static information, does the same  problem occur?
Logged

Offline jgrg1

  • Member
  • *
  • Posts: 18
Re: Annoying text over image problem with theme
« Reply #3 on: January 20, 2008, 05:17:44 PM »
Yes, I've tried:

# battery level and images
%ar%bt                   # spaces out to here - this comment isn't in the wps
%ar%bvV                   # spaces out to here - this comment isn't in the wps
%?bl<|%xdo|%xdp|%xdq|%xdr|%xds|%xdt|%xdu>

so the battery text is static, resulting in a similar problem (see attached image screenshot2.jpg). You get the same effect if you simply use spaces to position the text.

Interestingly, if you use the left margin tag the images are not written over. E.g.

# battery level and images
%m|99|%bt
%m|107|%bvV
%?bl<|%xdo|%xdp|%xdq|%xdr|%xds|%xdt|%xdu>

see attached screenshot image (screenshot3.jpg).

So it seems that there is a bug in the display of text over images with right alignment or alternating sublines where it seems to render blank spaces over any images. Should I submit this?

* screenshot2.jpg (46.73 kB, 185x232 - viewed 160 times.)

* screenshot3.jpg (48.01 kB, 181x229 - viewed 160 times.)
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Annoying text over image problem with theme
« Reply #4 on: January 21, 2008, 12:16:24 AM »
Quote from: jgrg1 on January 19, 2008, 08:23:19 PM
%m|95|%bt%t10;%m|115|%?bl<--|%bl%%>%t10;%m|95|%bvV%t10

I really don't know if this will make a difference for you but try replacing the above line with this:
Code: [Select]
%t10%m|115|%bl%%;%t10%m|95|%bt;%t10%m|95|%bvV
I noticed it reacted differently in the simulator because of the order the margins are dropped in.  I couldn't replicate the problem you're having, though, so I can't say exactly what's causing this, but I'm pretty sure I've seen people using alternating lines to the right of album art without a problem so I'm optimistic that this can be solved.

P.S. I'm still curious why the crossfade image isn't affected... Is it part of the background?
« Last Edit: January 21, 2008, 12:23:35 AM by MarcGuay »
Logged

Offline jgrg1

  • Member
  • *
  • Posts: 18
Re: Annoying text over image problem with theme
« Reply #5 on: January 21, 2008, 04:49:54 AM »
I'll give it a try, thanks.

Edit: Ok, just tried it and it worked fine for the first 10 seconds, but when the text changed, it overwrote the images again (see attached screenshot4.jpg). It seems to be an issue with alternating sublines because the static text approach using margins (shown in screenshot3.jpg above) works fine. So I guess I'll have to live with that.

Thanks for all your help.

Cheers
Justin

PS. No, it's not part of the background, the left hand most image is a pre-loaded image displayed with %?xf<|%xdx> where image x is the image. I'd expect the problem to occur across the whole line.

* screenshot4.jpg (47.08 kB, 193x232 - viewed 151 times.)
« Last Edit: January 21, 2008, 04:59:40 AM by jgrg1 »
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Annoying text over image problem with theme
« Reply #6 on: January 21, 2008, 10:07:18 AM »
Yeah there's something fishy about that one image displaying okay... If you post the .wps code I'll comb through it and see if I can find the problem....
Logged

Offline jgrg1

  • Member
  • *
  • Posts: 18
Re: Annoying text over image problem with theme
« Reply #7 on: January 21, 2008, 12:38:43 PM »
Sector2.wps is:

Code: [Select]
# Sector2.wps modified by Justin Gan, Sector.wps originally created by Sanjeev Herath #
%wd
%X|backdrop.bmp|
# Playback mode images
%xl|a|play.bmp|78|100|
%xl|b|ffwd.bmp|75|100|
%xl|c|rewind.bmp|75|100|
%xl|d|pause.bmp|78|100|
# Volume images - normal
%xl|f|vol_0.bmp|61|83|
%xl|g|vol_1.bmp|80|122|
%xl|h|vol_2.bmp|95|116|
%xl|i|vol_3.bmp|100|100|
%xl|j|vol_4.bmp|88|88|
%xl|k|vol_5.bmp|75|87|
%xl|l|vol_6.bmp|66|92|
%xl|m|vol_7.bmp|63|105|
%xl|n|vol_8.bmp|63|115|
# Volume images - shuffle
%xl|F|vol_sh_0.bmp|61|83|
%xl|G|vol_sh_1.bmp|71|115|
%xl|H|vol_sh_2.bmp|82|123|
%xl|I|vol_sh_3.bmp|93|118|
%xl|J|vol_sh_4.bmp|100|102|
%xl|K|vol_sh_5.bmp|94|87|
%xl|L|vol_sh_6.bmp|75|88|
%xl|M|vol_sh_7.bmp|66|94|
%xl|N|vol_sh_8.bmp|62|105|
# Repeat mode images
%xl|e|repeat_u.bmp|75|57|
%xl|E|repeat_l.bmp|64|147|
# Play mode images
%xl|v|crossfeed.bmp|61|197|
%xl|w|knob.bmp|79|197|
%xl|x|crossfade.bmp|3|198|
%xl|y|equaliser.bmp|23|197|
%xl|z|replaygain.bmp|43|197|
# battery images
%xl|o|bat_1.bmp|140|194|
%xl|p|bat_2.bmp|140|192|
%xl|q|bat_3.bmp|140|182|
%xl|r|bat_4.bmp|140|175|
%xl|s|bat_5.bmp|138|173|
%xl|t|bat_6.bmp|127|173|
%xl|u|bat_7.bmp|121|173|
# Progress images
%xl|O|prog_1.bmp|48|84|
%xl|P|prog_2.bmp|61|71|
%xl|Q|prog_3.bmp|88|71|
%xl|R|prog_4.bmp|109|84|
%xl|S|prog_5.bmp|109|110|
%xl|T|prog_6.bmp|88|131|
%xl|U|prog_7.bmp|61|131|
%xl|V|prog_8.bmp|48|110|

# Playlist name | Artist or composer
%s%ac%t5%?pn<%pn|%?ia<%ia|%?ic<%ic|Artist Unknown>>>;%s%ac%t5%?ia<%ia|%?ic<%ic|Artist Unknown>>
# Album
#%s%ac%?id<%id%?iy<  (%iy)|>|Album Unknown%?iy<  (%iy)|>>
%s%ac%?id<%id|Album Unknown>
# Title or file name
%s%ac%?it<%it|%fn>
# Genre
%s%ac%?ig<%ig|>

# Current time in track          Total time of track
%m|35|%pc                            %pt








# Volume
%m|113|%pvdB
#
# Date                Bitrate
   %cd/%cm/%cy%t10;     %fbkbps%t10
# Time                Codec
     %cl:%cM %cp%t10;%ac%fc                                                     %t10
# Posn in playlist / Playlist Count
%s%ac%pp/%pe

# battery level and images
#%ar%bt                    %t10;%ar%?bl<--|%bl%%>                    %t10;%ar%bvV                    %t10
%m|103|%bvV
%m|103|%bt
%?bl<|%xdo|%xdp|%xdq|%xdr|%xds|%xdt|%xdu>
#
# Percentage played in song
%?px<|%xdO|%xdO%xdP|%xdO%xdP%xdQ|%xdO%xdP%xdQ%xdR|%xdO%xdP%xdQ%xdR%xdS|%xdO%xdP%xdQ%xdR%xdS%xdT|%xdO%xdP%xdQ%xdR%xdS%xdT%xdU|%xdO%xdP%xdQ%xdR%xdS%xdT%xdU%xdV>
#
# Shuffle - Yes|No display the volume images
%?ps<%xdF%?pv<|%xdG|%xdG%xdH|%xdG%xdH%xdI|%xdG%xdH%xdI%xdJ|%xdG%xdH%xdI%xdJ%xdK|%xdG%xdH%xdI%xdJ%xdK%xdL|%xdG%xdH%xdI%xdJ%xdK%xdL%xdM|%xdG%xdH%xdI%xdJ%xdK%xdL%xdM%xdN|%xdG%xdH%xdI%xdJ%xdK%xdL%xdM%xdN%xdN|%xdG%xdH%xdI%xdJ%xdK%xdL%xdM%xdN%xdN>|%xdf%?pv<|%xdg|%xdg%xdh|%xdg%xdh%xdi|%xdg%xdh%xdi%xdj|%xdg%xdh%xdi%xdj%xdk|%xdg%xdh%xdi%xdj%xdk%xdl|%xdg%xdh%xdi%xdj%xdk%xdl%xdm|%xdg%xdh%xdi%xdj%xdk%xdl%xdm%xdn|%xdg%xdh%xdi%xdj%xdk%xdl%xdm%xdn%xdn|%xdg%xdh%xdi%xdj%xdk%xdl%xdm%xdn%xdn>>
#
# Playback mode - Stop|Play|Pause|Fast Forward|Rewind
%?mp<%xdd|%xda|%xdd|%xdb|%xdc>
#
# Repeat mode - Off|All|One|Shuffle|A-B
%?mm<|%xde%xdE|%xde|%xde%xdE|%xdE>
#
# Crossfade - Off|Shuffle|Track Skip|Always
%?xf<|%xdx>
#
# Replaygain - Off|Track|Album|TrackShuffle|AlbumShuffle|NoTag
%?rg<|%xdz>
#
# hard code the turning on of the icons for which there are no tags (yet)
%xdw%xdy%xdv

The icon images x-z are all similar in size to the one attached in my previous posts. If you need the images uploading, let me know.

Edited so as not to completely screw up the way the forums are displayed.
« Last Edit: January 21, 2008, 01:15:56 PM by GodEater »
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Annoying text over image problem with theme
« Reply #8 on: January 21, 2008, 01:02:56 PM »
If you put those lines inside of a code block (the piece of paper with the # sign on it above) it'll make them a lot more managable!

I think your problem might be something that's happened before but was never documented (at least in the CustomWPS wiki page).  Apparently there's a limit not only to the number of images you can use but also the total size of all images.  According to a thread I found it's approximately twice the size of the target screen plus a little bit.  You could find out if this is what's giving you grief if you comment out some of the other images and focus your attention solely on the problem area.  Hope this helps...
Logged

Offline jgrg1

  • Member
  • *
  • Posts: 18
Re: Annoying text over image problem with theme
« Reply #9 on: January 21, 2008, 02:19:51 PM »
Aah. I wondered how you did that.

I ran into the image size problem prior to posting on this forum; I had complete images for each of the volume and progress steps. These weren't displaying properly because I'd exceeded the buffer limit. I cut down the images so the volume and progress bars incrementally add small images to build up the full picture. The total number of images is less than 52, and the total size (on disk) of all the images including the background is 135kb, which is below the 160-5kb limit someone mentioned in another post.

The proof is in the pudding, all of the image icons show if the battery text is static. You get the half images showing when alternating sublines are used. The use of the alternating sublines shouldn't affect the image buffer.

Cheers for looking at it though.

PS. I just edited the .wps to remove all the extraneous images except for the icons and I still get the same problem.
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Annoying text over image problem with theme
« Reply #10 on: January 21, 2008, 02:51:32 PM »
Wow that one long line is really annoying.  :)

Does the same thing happen on the simulator?  I just did a really simple test like this:
Code: [Select]
%xl|o|purplesquare.bmp|0|0|
%m|95|%bt%t10;%m|115|%?bl<--|%bl%%>%t10;%m|95|%bvV%t10
%xdo

And the image displayed fine, despite alternating text being to the right of it.  Very strange, this.

---
Edit 1:
I was just looking at the size of the original Sector theme and it's creeping around 130kb already, with 5 added images (crossfade, replaygain, etc) at around 14kb each, it seems possible that you have gone over the size limit.  I hate to doubt your math skills but it might be worth taking a recount.  :)  Cheers....

Edit 2:
Crap, that doesn't take into account your "just use these images" test.  
« Last Edit: January 21, 2008, 03:12:52 PM by MarcGuay »
Logged

Offline jgrg1

  • Member
  • *
  • Posts: 18
Re: Annoying text over image problem with theme
« Reply #11 on: January 21, 2008, 06:10:57 PM »
I basically redid all the original Sector images. Don't forget also that the icon images I uploaded are .jpgs (for some reason I can't upload .bmp or .zips).

A Dos DIR output of the directory follows:

Code: [Select]
 Directory of C:\rockbox\Simulator\sandisk-e200-sim-w32\archos\.rockbox\wps\Sector2

21/01/2008  23:04    
         .
21/01/2008  23:04    
         ..
19/01/2008  19:37            77,496 backdrop.bmp
19/01/2008  13:06             1,528 bat_1.bmp
19/01/2008  13:05             1,824 bat_2.bmp
19/01/2008  13:04             2,504 bat_3.bmp
19/01/2008  13:03             2,980 bat_4.bmp
19/01/2008  13:01             3,552 bat_5.bmp
19/01/2008  13:00             4,472 bat_6.bmp
19/01/2008  12:58             5,024 bat_7.bmp
19/01/2008  19:50               848 crossfade.bmp
19/01/2008  19:49               856 crossfeed.bmp
21/01/2008  23:04                 0 dir.txt
19/01/2008  19:50               936 equaliser.bmp
19/01/2008  12:57             1,096 ffwd.bmp
19/01/2008  19:49               776 knob.bmp
19/01/2008  12:57               856 pause.bmp
19/01/2008  12:57               936 play.bmp
19/01/2008  13:16             1,136 prog_1.bmp
19/01/2008  13:16             1,120 prog_2.bmp
19/01/2008  13:17             1,120 prog_3.bmp
19/01/2008  13:20             1,136 prog_4.bmp
19/01/2008  13:20             1,136 prog_5.bmp
19/01/2008  13:21             1,120 prog_6.bmp
19/01/2008  13:21             1,120 prog_7.bmp
19/01/2008  13:21             1,136 prog_8.bmp
19/01/2008  12:56             1,348 repeat_l.bmp
19/01/2008  12:56             1,208 repeat_u.bmp
19/01/2008  19:49               856 replaygain.bmp
19/01/2008  12:56             1,096 rewind.bmp
17/01/2008  23:31             5,888 vol_0.bmp
19/01/2008  13:30               308 vol_1.bmp
19/01/2008  13:30               320 vol_2.bmp
19/01/2008  13:29               416 vol_3.bmp
19/01/2008  13:29               656 vol_4.bmp
19/01/2008  13:28               392 vol_5.bmp
19/01/2008  13:28               448 vol_6.bmp
19/01/2008  13:27               448 vol_7.bmp
19/01/2008  13:27               776 vol_8.bmp
17/01/2008  23:36             5,888 vol_sh_0.bmp
19/01/2008  13:31               420 vol_sh_1.bmp
19/01/2008  13:32               364 vol_sh_2.bmp
19/01/2008  13:33               296 vol_sh_3.bmp
19/01/2008  13:33               436 vol_sh_4.bmp
19/01/2008  13:34               668 vol_sh_5.bmp
19/01/2008  13:35               540 vol_sh_6.bmp
19/01/2008  13:36               420 vol_sh_7.bmp
19/01/2008  13:36               448 vol_sh_8.bmp
              46 File(s)        138,348 bytes
               2 Dir(s)   5,187,174,400 bytes free

I'll try your suggestion though.


Ok, uploaded is a zip file of the theme. I've renamed it Sector2.txt. If you save it and rename it Sector2.zip, you should be able to extract it.
« Last Edit: January 22, 2008, 04:08:01 PM by Llorean »
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Annoying text over image problem with theme
« Reply #12 on: January 22, 2008, 04:09:26 PM »
The reason we don't allow .zip files to be attached is that we have very limited space for attachments on this server. Please, please, be smart enough to realize that if it won't let you attach it with the existing extension, simply renaming it doesn't make it allowed within the rules suddenly. There's tons of free file hosting on the internet.
Logged

Offline jgrg1

  • Member
  • *
  • Posts: 18
Re: Annoying text over image problem with theme
« Reply #13 on: January 23, 2008, 04:51:37 AM »
Oops. Sorry.
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: Annoying text over image problem with theme
« Reply #14 on: January 23, 2008, 06:06:50 PM »
If you move the images above the

Code: [Select]
# battery level and images
%t10%m|115|%bl%%;%t10%m|100|%bt;%t10%m|105|%bvV

line it displays fine... Must have something to do with the order the items fall on the screen...

This, although not as organized as yours, works:

Code: [Select]
# Playlist name | Artist or composer 
%s%ac%t5%?pn<%pn|%?ia<%ia|%?ic<%ic|Artist Unknown>>>;%s%ac%t5%?ia<%ia|%?ic<%ic|Artist Unknown>>
# Album
#%s%ac%?id<%id%?iy<  (%iy)|>|Album Unknown%?iy<  (%iy)|>>
%s%ac%?id<%id|Album Unknown>
# Title or file name
%s%ac%?it<%it|%fn>
# Genre
%s%ac%?ig<%ig|>

# Current time in track          Total time of track
%m|35|%pc                            %pt
%?ps<%xdF%?pv<|%xdG|%xdG%xdH|%xdG%xdH%xdI|%xdG%xdH%xdI%xdJ|... etc..
%?mp<%xdd|%xda|%xdd|%xdb|%xdc>
%?mm<|%xde%xdE|%xde|%xde%xdE|%xdE>
%?rg<|%xdz>
%xdw%xdy%xdv
%?px<|%xdO|%xdO%xdP|%xdO%xdP%xdQ|%xdO%xdP%xdQ%xdR|%xdO%xdP%... etc...
%?bl<|%xdo|%xdp|%xdq|%xdr|%xds|%xdt|%xdu>
%m|113|%pvdB
#
# Date                Bitrate
   %cd/%cm/%cy%t10;     %fbkbps%t10
# Time                Codec
     %cl:%cM %cp%t10;%ac%fc                                                     %t10
# Posn in playlist / Playlist Count
%s%ac%pp/%pe


# battery level and images
%t10%m|115|%bl%%;%t10%m|100|%bt;%t10%m|105|%bvV
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Annoying text over image problem with theme
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.088 seconds with 15 queries.