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 Jonathan Gordon - 2007-04-11
Last edited by Jonathan Gordon - 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  Jonathan Gordon
2007-04-16 09:09
Reason for closing:  Accepted
Additional comments about closing:  

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

Pascal Briehl commented on 2007-04-11 15:10

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

Jonathan Gordon commented on 2007-04-12 08:58

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.

Jonathan Gordon commented on 2007-04-12 11:40

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

Jonathan Gordon commented on 2007-04-12 12:33

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…

Eric Linenberg commented on 2007-04-12 14:07

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

Jonathan Gordon commented on 2007-04-12 14:16

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

Eli Sherer commented on 2007-04-12 17:46

in that case

Eli Sherer commented on 2007-04-12 17:47

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

denis commented on 2007-04-12 19:46

Eli, aww, that looks nice!

Bobby Graese commented on 2007-04-13 02:36

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.

Jonathan Gordon commented on 2007-04-13 03:09

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.

Jonathan Gordon commented on 2007-04-13 05:09

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

Pascal Briehl commented on 2007-04-13 08:07

I hope you enjoy them

Admin
Linus Nielsen Feltzing commented on 2007-04-13 08:26

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

Steve Bavin commented on 2007-04-13 08:26

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]’)

Pascal Briehl commented on 2007-04-13 08:54

you forgot the bitmaps. look at the 2nd comment

Steve Bavin commented on 2007-04-13 09:02

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.

Pascal Briehl commented on 2007-04-13 09:06

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”.

Pascal Briehl commented on 2007-04-13 09:07

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

Will Robertson commented on 2007-04-13 16:44

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.

Bobby Graese commented on 2007-04-14 02:31

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?

Jonathan Gordon commented on 2007-04-14 09:02

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

Dominik Riebeling commented on 2007-04-14 09:53

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 …

Jonathan Gordon commented on 2007-04-14 11:56

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

Jonathan Gordon commented on 2007-04-14 13:26

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…)

Will Robertson commented on 2007-04-14 14:08

New icons to match the reduced set.

Pascal Briehl commented on 2007-04-14 16:12

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.

Pascal Briehl commented on 2007-04-14 16:18
Will Robertson commented on 2007-04-15 01:36

And here are the viewers icons I forgot last time.

Will Robertson commented on 2007-04-15 01:57

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

Jonathan Gordon commented on 2007-04-15 01:59

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 Sherer commented on 2007-04-15 04:38
Jonathan Gordon commented on 2007-04-15 04:56

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