• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category User Interface → Themes
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.8.1
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by jdgordon - 2011-05-22
Last edited by jdgordon - 2011-09-06

FS#12124 - draw lists using skin engine

This patch allows themers to draw the list items using the skin engine. This first version is proof-of-concept and not entirely usable just yet.

Added tags to make it work:
%Lb(viewport label, x, y, width, height) - specify the viewport label to draw for each item in the list. x,y,width,height is the box to draw it in. x,y is offset from the UI viewport
%LT - the text for the list item to be displayed in the viewport
%Lc - “is this item the selected item?” - use as a conditional

Every viewport with the given label will be drawn in the viewport box specified in the %Lb() tag, this should allow you to do pixel accurate item placement (for the items icon/text/etc). The UI viewport is used and as many items as fit will be drawn.

example sbs….




Next steps:
* Add support tags to make this more usable: need a tag for the scrollbar, colour/gradient filling for viewports, etc
* Add option to tile the viewports instead of displaying them in the traditional list (for touch themes!)
* Add a second viewport config to display a different viewport for the selected item (which would allow scrolling in that one viewport)
* ?

I havnt tested this yet but *I THINK* the skin engine will allow this to show different styled lists using the usual conditional system (i.e putting more than one %Lb() tag in conditionals using *different* viewport labels, as long as only one is displayed at any one time). someone test this!

Closed by  jdgordon
2011-09-06 14:14
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

in r30461

new version, adds a bunch of safety checking so it doesnt crash so often :)
Also changes %Lb() to only need the viewport label and width/height, x,y arent needed (so %Lb(a,100,100))

Make the sbs update fully after each list draw so it all draws more smoothly. Also set the %LT tag to the selected items text so if can be used in external viewports

edit: attaching my test .sbs also

edit2: updated diff to not crash if you try putting %Lb in a conditional (which works)

Add support to make the list tiled (add the word 'tile' as the last param to %Lb().
Add %LI to get the items icon

fix a bunch of bugs and hopefully remove all warnings

updated to ad the list-skinned.c file

note to self.. figure out how to get list colours working with this

woot! got scrolling in the selected item working :) and I disable any accidental scrolling so it doesnt look like ass if the user accidentally tried to do that on the non selected item.
just about ready to commit this i think. Ideally I'd like to make the scrollbar work also but I tihnk that isnt a showstopper


Available keyboard shortcuts


Task Details

Task Editing