Support and General Use > Theming and Appearance Customization
eDen theme for Sansa Clip not showing playtime
(1/1)
Sphex2.0:
New(ish) to Rockbox 3.13 on my original Sansa Clip v1 (still going strong, thanks) thru Windows 7 x64 PC.
All is well except for an apparent glitch with the eDen theme (http://themes.rockbox.org/index.php?themeid=1559&target=sansaclip): track playtime info does not appear at top right of the WPS, only the colon symbol -- no digits. I've taken the liberty of modifying the theme screenshot to show what I mean (not actual capture from player).
Anyone have suggestions as to a cause/fix? Missing font, perhaps?
Any more tech detail happily provided, and thanks in advance.
[Saint]:
If it were a missing font, the theme wouldn't load at all. Additionally, its using the same font for all the textual assets in the theme (which is actually pretty silly, because it allows the user to choose a font that will exceed the bounds of the container viewport) .
A theme will not display if any required asset is missing.
To the issue at hand, first of all, that's a clock, not playback progression.
The entire theme is ridiculously simple, lets take a look:
--- Code: ---%wd
%xl(A,battery9px.bmp,0,0,6)
%xl(B,mode13px.bmp,0,0,5)
%xl(C,volume9px.bmp,0,0,3)
%xl(D,shuffle7px.bmp,0,0,2)
#
# Battery
%V(1,2,16,9,0)
%?if(%bp, =, p)<%xd(Aa)|%?bl<|%xd(Ab)|%xd(Ab)|%xd(Ac)|%xd(Ad)|%xd(Ae)|%xd(Af)|%xd(Af)>>
#
# Playing mode
%V(50,2,14,13,0)
%?mp<%xd(Ba)|%xd(Bb)|%xd(Bc)|%xd(Bd)|%xd(Be)>
#
# Clock
%V(80,3,47,8,0)
%ar%ck:%cM
#
# Track info
%V(0,25,128,16,0)
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|Unknown Artist>
#
# Shuffle, Repeat
%V(0,49,7,7,0)
%?if(%mm, =, 3)<%xd(Db)|%?if(%ps, =, s)<%xd(Da)|>>
#
# Volume
%V(111,47,16,9,0)
%?if(%pv, <=, -81)<%xd(Cb)|%?if(%pv, >=, 6)<%xd(Cc)|%pv(0, 0, 16, 9, volume9px.bmp)>>
#
# Progress Bar
%V(0,56,128,8,0)
%pb
--- End code ---
If we look at the "Clock" section, we can see that all it is doing is:
%ar - Align text to the right.
%ck - Hour, 0-23 non-0-padded.
: - A colon.
%cM - Minute, 00-59, 0-padded.
It does it in a little bit of a brain dead way (I dislike hard-coding*), but it is syntactically correct.
Do any other themes correctly display RTC information?
PS: As a side note, you should update your Rockbox install. 3.13 is truly ancient, and there's really no good reason not to use the development snapshot builds. For the targets that have a release cycle (all the "stable" ones) the development snapshots should be perfectly fine. Most user seem to avoid the development snapshots because they believe them to be unstable, and while it is true that there is the potential to encounter new bugs, it is also true that the release builds are ~18 months old and a great many bugs have since been removed, and features added or refined.
Generally speaking, if you have a "stable" target device, there is no good reason not to use the development builds.
(As an aside, the "stable", "unstable", and "unusable" target classifications are VERY misleading and don't mean what you might expect them to mean. It is simply a set of criteria the target needs to meet, it doesn't actually imply anything meaningful regarding stability or usability).
[Saint]
*If it was me, I would've made the clock respect the user's wishes regarding formatting and added some simple safety checks, like so:
--- Code: ---# Clock
%V(80,3,47,8,0)
%ar%?cc<%?cf<%cH:%cM|%cI:%cM%cp>|NO RTC>
--- End code ---
%ar - Right align the following text.
%?cc - Is there an RTC present?
< - Beginning of the enclosure for the %?cc conditional statement.
%?cf - Has the user specified 24 or 12 hour formatting?
< - Beginning of the enclosure for the %?cf conditional statement.
%cH - Hour, 00-23, 0-padded
: - Colon.
%cM - Minute, 00-59, 0-padded.
| - Pipe to separate 24/12 hour cases in our %?cf conditional statement.
%cI - Hour, 01-12, 0-padded.
: - Our friend the colon again.
%cM - Minute, 00-59, 0-padded.
%cp - Lower case "am/pm" indicator.
> - End of the enclosure for the %?cf conditional statement.
| - Pipe to separate RTC present/absent cases in our %?cc conditional statement.
NO RTC - Display this text when RTC is absent
> - End of the enclosure for the %?cc conditional statement.
Sphex2.0:
Clock, eh? Didn't realize that. Don't need it, either. Indeed I'm not sure I understand, he said rhetorically, how a clock would work on a device whose battery can run down completely... Thanks for the detailed and above-my-pay-grade info.
PS: I tried updating to the latest dev build for my player (thru the Utility) but it froze up after installation -- couldn't boot to Rockbox, couldn't boot to the Sansa firmware, it just sat glowing blue at me. Lathered, rinsed, repeated, no good. Uninstalling and reverting to the stable 3.13 worked, and works, fine. I expect the battery to fail completely sometime over the next several months, since my Clip is around 5 years old, so my next player will prob be able to use a later version.
Navigation
[0] Message Index
Go to full version