Given the fact that a theme can currently consist of 3 significant files (sbs, wps & fms), it seems to make sense to have all common elements in the sbs (outside of the custom viewport area), leaving the wps and fms to draw only things that are inside the custom viewport area. Simple examples are battery, volume, date, repeat/playback and other simple indicators. Now I understand that some themes may not lend themselves to this type of treatment, however there are many that do.
See an example of sharing common areas in the theme (with screen shots) that I posted to the forum here
http://forums.rockbox.org/index.php?topic=24894.0In taking the consolidation approach, I have encountered one area that required more conditional statements than I would have liked (making my sbs quite complicated)
Let me use the theme linked above as an example. Between the bottom two lines, I display basic information about what the dap is doing. In the wps, the playlist name along with track times and counts is displayed. In the fms, station information is displayed. For other screens, it depends what the dap is doing. If music is being played, music information is displayed. If the radio is being played, station information shows. If the dap is stopped, neither shows.
In order to do all of that, I have had to use nested conditionals of the %cs (current screen) and %mp (playback mode) tags. For example, if the current screen is a menu screen, there are a bunch of differences in what is displayed that depend if a file or the radio is being played.
I hope I have expressed the question/dilemma clearly.
Any ideas on how things can be consolidated/simplified? I think the approach of consolidating common areas in the sbs is good, but if my understanding of themeing is correct, the result is not always streamlined (particularly in the case of combination of screen and playback mode data)
Any input would be appreciated.