Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category User Interface
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by jdgordon - 2007-04-11
Last edited by jdgordon - 2007-04-11

FS#7013 - loadable icons

This patch allows the user to load a bmp with a new iconset to use in the lists.
Its not 100% finished but I wanted to get it out so people can start drawing so we can have some nice ones for the commit.
attached is the patch as well as the default icons which are needed.
put remote_default_icons into apps/bitmaps/remote_native and the other two in apps/bitmaps/native.

The format for the iconset is exactly the same as the attached bmps.
A single horizontal strip with all icons in the order they appear in apps/gui/icon.h with no space between icons (and all are the same width).

charcell has not been handled yet, not has the viewers.config icons.

edit: forgot to mention that you need to add the line “iconset: /.rockbox/icons/<your iconset>.bmp” to config.cfg to get it to load an iconset

Closed by  jdgordon
2007-04-16 09:09
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

Anyone feel like making a nice wiki page for these sets?

It seems as you forgot an remote_default_icons.6x8x2.bmp :)

And this version has working viewers.config and a proper ui to make it all work.
I thing to note, because the number of icons in the bmp isnt know, there is a setting under “[remote] lcd settings” “icon height” which needs to be set to the correct value or the icons wont be shown correctly (themers should handle this so it wont be a problem for regular users).

now, to set an icon in the viewers.config file, you index it from the end of the icon.h enum (icon 0 is the folder icon, 1 is chip8, etc). to use one of the builtin icons do “b6” (without the quotes) to get the font icon. use “-” for no icon.

The bmp format has changed to vertical, so grab new ones…

charcell isnt done yet, all other targets should work correctly.

this fixes icons on the charcell, you cant load a new icon set yet, use the bmps from the above comment

lastly, this little addition allows you to change the icon for any extension that rockbox supports!
to do that have a file named /.rockbox/icons/<your theme>.icons where <your theme> is the same name as the .bmp file for the theme (e.g gant.bmp and gant.icons).
The .icons file is in the format
<extension>: <icon> (<icon> being the same format as used by viewers.config)

e.g “mp3: b5” or “wav: -” or “mpg: 2”

This is now at a state where I believe its commitable. The only thing missing is customizable icons for charcell…

What about adding different size icons? Truly theme-able menus would be nice.

bah,
I explained it better in the forum thread.
you can load any size icons up to 24×24 in full 16bit colour!

in that case

this patch is very important to advance to the next graphical interface!!!
next step maybe enlarging the statusbar for 24bit bmps there…

Eli, aww, that looks nice!

Just one problem: I get the error “Data abort at 00028BD4” when trying to apply an icon set. This is using a H10, and latest SVN.

Eli, Those icons look amazing!
The only problem is that the bmp’s use the wps icon (which isnt your fault, and easy to get around).
There was a bug in the code which stopped almost all icons being displayed (and the list code needs a bit of tweaking to display right), so hopefully ill update the patch a bit later..
but untill then
http://jdgordon.mine.nu:8080/jonno/rockbox/ has screenshots of the h300 using Eli’s icons.
In that folder also has two files (elisherer.bmp and .icons) put them both in /.rockbox/icons/ and run the theme.cfg file and it will load his themes with the correct icon for the bmps.

new version. Everything should be working correctly. i.e ready to commit…..

I hope you enjoy them

Project Manager

I think this patch looks really good. What is the binary size impact on the Archos targets?

Hi jdgordon,

I get a failure to build if I just apply this patch:
make[2]: *** No rule to make target `default_icons.6x8x16.bmp’, needed by `/home/Steve/rockbox/build/apps/bitmaps/native/default_icons.6x8x16.c’. Stop.
… gui/icon.c:35:27: default_icons.h: No such file or directory
gui/icon.c:37:34: remote_default_icons.h: No such file or directory
gui/icon.c:55: error: `default_icons’ undeclared here (not in a function)
gui/icon.c:55: error: initializer element is not constant
gui/icon.c:55: error: (near initialization for `inbuilt_icons[0]’)

you forgot the bitmaps. look at the 2nd comment

Ah, where do I put the bitmaps? The patch needs to contain at least a default set.

Also I’m fairly sure that default_icons.h and remote_default_icons.h should have been included.

put “default_icons.6x8x1.bmp” and “default_icons.6x8x16.bmp” into “apps/bitmaps/native” and “remote_default_icons.6x8x1.bmp” and “remote_default_icons.6x8x2.bmp” into “apps/bitmaps/remote_native”.

that .h files will be generated by bmp2rb from the bitmaps while you compile.

Here’s a set I knocked up from the tango icon library.
I didn’t make an icon for wavview but will icons for files with inbuilt icons be needed anyway (ie mp3 is inbuilt to display the audio icon, but is also assigned the vbrfix icon as well, but only the inbuilt icon is shown).
I made it 20×16 because I like a little gap between the icon and the menu item text.

I keep getting a Data abort error when trying to apply an icon set. This time, with a build with this being the only patch applied, the error is “Data abort at 00028CF4”. Using SVN revision 13152 on an iriver H10. Is anyone else experiencing a data abort or am I the only one?

Linus, bin size depends on the iconset being loaded into the core (obviously), with the current icons ondioSP is up 1100 and h300 is 1300 up. BUT, there was talk last night before i had to ggo that the context menu items to load the bmps should be removed (so 200bytes less maybe), and the viewer icons should be removed, so another few hundred down.. we’ll see..

TruJournals: data aborts are useless in custom builds without your rockbox.map file in the <build dir>/apps/ folder, please attach that so we can actually figure out the problem.

Those icons look great :)

hopefully ill attach a new version tonight which will hopefully be the final one :p

TrueJournals: did you ensure a current svn runs on your player? I.e. your standard build isn’t affected by the old bootloader / new build issue? Just asking for the case …

new version.
This one goes back to seperate buffers for the viewers and inbuilt icons, so, you need to remove the viewer icons before loading the above iconsets or they wont display correctly. (attached is new bmps for the inbuilt icons)
player needs to be checked, i think its possible this version breaks it, but not sure

copy+paste mistake was breaking the icons for charcell.. all fixed. hopefully we can commit this one

deltas:
player - down by less than 100bytes
ondioSP - +1kb
h300 - +4700b ! (16bit colour bmps being built in…)

New icons to match the reduced set.

I think there shold be new bitmaps with the default viewericons, because I don’t think mpgs, bmps, jpgs, … should have only icons if you load an custom viewers iconset.

And here are the viewers icons I forgot last time.

Here’s a better version, removed duplicates.
To use this iconset for the viewers you must be using the attached viewers.config file

jdgordon edit: This bmp is compatable with the .patch in the next comment. (in the future please dont supply a viewers.config, but a <your filename>.icons

very minor change in the code so the chip8 icon is the first in the viewers bmp and not the folder icon.

it seems i didnt explain the viewers.config (and .icons and viewers.bmp) files very well..
The viewers bmp can have up to the same amount of icons as the main iconset file (and they must be the same dimensions).
the 3rd field in viewers.config is either “b<num>”, “<num>, or “-”, where <num> is the index of the icon you want to use (starts at 0). the “b” means to use the builtin icons (well, the iconset for the main icons.. got a better idea for this letter?), and the - means no icon.

now, if your viewers bmp is called my_viewers.bmp (in /.rockbox/icons) then the file my_viewers.icons is read which has the format “<extension>: <icon>” where <extension> is the file extensions icon you want to change, and <icon> is the same format as viewers.config (”b<num>”, “<num>, or “-”)

and lastly, if you are going to upload bmps, please attach the .cfg for it as well, (and the .icons if you want also).

edit: Aliask beat me to the comment, please dont edit viewers.config… always supply a .icons file

eli: nice, but as i said above.. the folder icon shouldnt be in the viewers bmp..

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing