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:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Viewports problem - SOLVED
« previous next »
  • Print
Pages: [1]

Author Topic: Viewports problem - SOLVED  (Read 2226 times)

Offline yapper

  • Rockbox Expert
  • Member
  • *
  • Posts: 794
Viewports problem - SOLVED
« on: April 26, 2008, 03:04:14 PM »
I've just been playing with a slight modification of the cabbiev2 theme, adding viewports and squeezing more information onto the screen.
I've run across a problem where part of the display gets 'wiped' under specific circumstances, revealing the WPS background. I'm sure I've seen this mentioned before, but couldn't find anything when searching the forums.

I've attached 3 screendumps. The first shows the screen before any 'corruption' occurs. The second shows what happens when the volume is altered sufficiently for the volume icon to change (e.g. next/previous section of the bitmap strip gets displayed). The third screendump shows what happens when a seek is done.
WPS code:
Code: [Select]
%wd
%X|wpsbackdrop-160x128x2.bmp|
%P|pb-160x128x2.bmp|
%xl|A|lock-160x128x2.bmp|48|114|2|
%xl|B|battery-160x128x2.bmp|66|115|10|
%xl|C|volume-160x128x2.bmp|87|114|10|
%xl|D|shuffle-160x128x2.bmp|107|115|
%xl|E|repeat-160x128x2.bmp|127|113|4|
%xl|F|playmode-160x128x2.bmp|145|114|5|
%Cl|2|11|s64|s64|
%pb|8|1|159|77|
%?mh<%xdAa|%xdAb>
%?bp<%?bc<%xdBa|%xdBb>|%?bl<|%xdBc|%xdBd|%xdBe|%xdBf|%xdBg|%xdBh|%xdBi|%xdBj>>
%?pv<%xdCa|%xdCb|%xdCc|%xdCd|%xdCe|%xdCf|%xdCg|%xdCh|%xdCi|%xdCj>
%?ps<%xdD>
%?mm<|%xdEa|%xdEb|%xdEc|%xdEd>
%?mp<%xdFa|%xdFb|%xdFc|%xdFd|%xdFe>
%?C<%C>
#Current track name
%V|68|10|91|12|1|0|3|
%s%al%?it<%it|%fn>
#Current artist name
%V|68|22|91|12|1|0|3|
%s%al%?ia<%ia|%?d2<%d2|(root)>>
#Current album name
%V|68|34|91|12|1|0|3|
%s%al%?id<%id|%?d1<%d1|(root)>>
# Codec and bitrate
%V|67|64|91|12|1|0|3|
%al%fc%ar%fbkbps%fv
# Current position within playlist, followed by number of entries in playlist
%V|3|86|155|12|1|0|3|
%pc%ac%pp of %pe%ar%pr
# Next (doh!)
%V|3|98|26|12|1|0|3|
%alNext:
# Next track name, then artist name
%V|30|98|129|12|1|0|3|
%s%?It<%It|%Fn>   %Ia
%V|1|1|1|1|1|0|3|

Commenting-out the "%?pv<%xdCa|..." line prevents the corruption shown in the second screendump, so I'm pretty sure of that link.
Also leaving the WPS (e.g. by hitting Menu) and then returning cause the 'good' original display to be redrawn.

Can anyone offer some pointers on how to resolve this?

* dump_0001.png (2.04 kB, 160x128 - viewed 272 times.)

* dump_0002.png (1.86 kB, 160x128 - viewed 265 times.)

* dump_0003.png (2 kB, 160x128 - viewed 276 times.)
« Last Edit: April 26, 2008, 04:31:13 PM by yapper »
Logged
G2 iPod 20GB / Sansa c240 v1 + 2GB microSD / Sansa c250 v1 / Sansa e250 v1 + 8GB microSDHC / Sansa Fuze v2 + 32GB microSDHC

Offline ZincAlloy

  • Member
  • *
  • Posts: 488
Re: Viewports problem
« Reply #1 on: April 26, 2008, 03:11:38 PM »
you need to put the icons into a viewport.
Logged

Offline yapper

  • Rockbox Expert
  • Member
  • *
  • Posts: 794
Re: Viewports problem
« Reply #2 on: April 26, 2008, 03:31:51 PM »
Aha!  I would have never guessed that. Thanks.  :)

Edit:
If my interpretation is correct, I could use one viewport for all the icons in the lower right area, and then use the %x tag X offset to position the different icons horizontally within that viewport?

* viewport.png (2.09 kB, 160x128 - viewed 298 times.)
« Last Edit: April 26, 2008, 03:56:34 PM by yapper »
Logged
G2 iPod 20GB / Sansa c240 v1 + 2GB microSD / Sansa c250 v1 / Sansa e250 v1 + 8GB microSDHC / Sansa Fuze v2 + 32GB microSDHC

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: Viewports problem
« Reply #3 on: April 26, 2008, 04:25:37 PM »
Yes, within a viewport positioning tags are relative to the viewport top left corner, not the screen.
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline yapper

  • Rockbox Expert
  • Member
  • *
  • Posts: 794
Re: Viewports problem
« Reply #4 on: April 26, 2008, 04:30:53 PM »
Thanks  :)

It's obvious now, with hindsight.

Edit: The 'finished' version is in the wiki here: http://www.rockbox.org/wiki/WpsIriverH100

* cabbieVP.png (2.24 kB, 160x128 - viewed 271 times.)
« Last Edit: April 30, 2008, 10:30:53 PM by yapper »
Logged
G2 iPod 20GB / Sansa c240 v1 + 2GB microSD / Sansa c250 v1 / Sansa e250 v1 + 8GB microSDHC / Sansa Fuze v2 + 32GB microSDHC

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Viewports problem - SOLVED
 

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

Page created in 0.074 seconds with 15 queries.