lcd_color/cabbiev2: New iconset in multiple sizes

The new iconset features transparency which can be more easier generated
from svgs and looks better. For for bigger displays there are new sizes.

The bmps are the generated from the SVGs added to the tree and
create-icons-from-tango.pl is updated to enable easy generation.

rockbox-clef.svg is changed to have a bit more border.

NOTE: Icons for greyscale are unchanged. Someone needs to update them, I don't know how to do it.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31059 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2011-11-26 16:01:11 +00:00
parent 69f4245d9d
commit b907f2fd23
55 changed files with 161 additions and 96 deletions

View file

@ -208,26 +208,57 @@ static const char graphic_numeric[] = "graphic,numeric";
#ifdef HAVE_LCD_BITMAP
#if LCD_HEIGHT <= 64
#define DEFAULT_FONT_HEIGHT 8
#define DEFAULT_FONTNAME "08-Rockfont"
#elif LCD_HEIGHT <= 80
#define DEFAULT_FONT_HEIGHT 11
#define DEFAULT_FONTNAME "11-Sazanami-Mincho"
#elif LCD_HEIGHT <= 220
#define DEFAULT_FONTNAME "12-Adobe-Helvetica"
#define DEFAULT_FONT_HEIGHT 12
#elif LCD_HEIGHT <= 320
#define DEFAULT_FONTNAME "15-Adobe-Helvetica"
#define DEFAULT_FONT_HEIGHT 15
#elif LCD_HEIGHT <= 400
#define DEFAULT_FONTNAME "16-Adobe-Helvetica"
#elif LCD_HEIGHT <= 480 && !(CONFIG_PLATFORM & (PLATFORM_MAEMO|PLATFORM_PANDORA))
#define DEFAULT_FONTNAME "27-Adobe-Helvetica"
#define DEFAULT_FONT_HEIGHT 16
#elif LCD_HEIGHT <= 480 && LCD_WIDTH < 800
#define DEFAULT_FONT_HEIGHT 27
#else
#define DEFAULT_FONTNAME "35-Adobe-Helvetica"
#define DEFAULT_FONT_HEIGHT 35
#endif
#define DEFAULT_GLYPHS 250
#define MIN_GLYPHS 50
#define MAX_GLYPHS 65540
#else
#define DEFAULT_FONTNAME ""
#define DEFAULT_FONT_HEIGHT 12
#endif
#ifndef DEFAULT_FONTNAME
/* ugly expansion needed */
#define _EXPAND2(x) #x
#define _EXPAND(x) _EXPAND2(x)
#define DEFAULT_FONTNAME _EXPAND(DEFAULT_FONT_HEIGHT) "-Adobe-Helvetica"
#endif
#ifdef HAVE_LCD_COLOR
#if DEFAULT_FONT_HEIGHT >= 31
#define DEFAULT_ICONSET "tango_icons.32x32"
#define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.32x32"
#elif DEFAULT_FONT_HEIGHT >= 23
#define DEFAULT_ICONSET "tango_icons.24x24"
#define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.24x24"
#elif DEFAULT_FONT_HEIGHT >= 15
#define DEFAULT_ICONSET "tango_icons.16x16"
#define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.16x16"
#else
#define DEFAULT_ICONSET "tango_icons.12x12"
#define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.12x12"
#endif
#elif LCD_DEPTH <= 2 /* greyscale */
#define DEFAULT_ICONSET "tango_small_grey"
#define DEFAULT_VIEWERS_ICONSET "tango_small_viewers_mono"
#else /* monochrome */
#define DEFAULT_ICONSET ""
#define DEFAULT_VIEWERS_ICONSET ""
#endif
#ifdef HAVE_REMOTE_LCD
@ -238,17 +269,6 @@ static const char graphic_numeric[] = "graphic,numeric";
#endif
#endif /* HAVE_REMOTE_LCD */
#ifdef HAVE_LCD_COLOR
#define DEFAULT_ICONSET "tango_small"
#define DEFAULT_VIEWERS_ICONSET "tango_small_viewers"
#elif LCD_DEPTH >= 2
#define DEFAULT_ICONSET "tango_small_mono"
#define DEFAULT_VIEWERS_ICONSET "tango_small_viewers_mono"
#else /* monochrome */
#define DEFAULT_ICONSET ""
#define DEFAULT_VIEWERS_ICONSET ""
#endif
#define DEFAULT_THEME_FOREGROUND LCD_RGBPACK(0xce, 0xcf, 0xce)
#define DEFAULT_THEME_BACKGROUND LCD_RGBPACK(0x00, 0x00, 0x00)
#define DEFAULT_THEME_SELECTOR_START LCD_RGBPACK(0xff, 0xeb, 0x9c)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 7 KiB

View file

@ -22,51 +22,93 @@
# To be run from the icons/ folder in a Rockbox checkout.
use File::Temp;
use Getopt::Long;
# list of icons for strip
# Use relative paths to point to icons in the tree, relative to the icons/ folder
# (must start with . or ..)
# Other are treated relatively to the tango sources tree
my @iconlist = (
"mimetypes/audio-x-generic", # Icon_Audio
"places/folder", # Icon_Folder
"actions/format-indent-more", # Icon_Playlist
"actions/media-playback-start", # Icon_Cursor ###
"apps/preferences-desktop-wallpaper", # Icon_Wps
"devices/computer", # Icon_Firmware ###
"apps/preferences-desktop-font", # Icon_Font
"apps/preferences-desktop-locale", # Icon_Language
"categories/preferences-system", # Icon_Config
"status/software-update-available", # Icon_Plugin
"actions/bookmark-new", # Icon_Bookmark
"places/start-here", # Icon_Preset
"actions/go-jump", # Icon_Queued
"actions/go-next", # Icon_Moving
"devices/input-keyboard", # Icon_Keyboard
"actions/mail-send-receive", # Icon_Reverse_Cursor
"apps/help-browser", # Icon_Questionmark
"actions/document-properties", # Icon_Menu_setting
"categories/applications-other", # Icon_Menu_functioncall
"actions/list-add", # Icon_Submenu
"categories/preferences-system", # Icon_Submenu_Entered
"actions/media-record", # Icon_Recording
"devices/audio-input-microphone", # Icon_Voice ###
"categories/preferences-desktop", # Icon_General_settings_menu
"categories/applications-other", # Icon_System_menu
"actions/media-playback-start", # Icon_Playback_menu
"devices/video-display", # Icon_Display_menu
"devices/video-display", # Icon_Remote_Display_menu
"devices/network-wireless", # Icon_Radio_screen ###
"mimetypes/package-x-generic", # Icon_file_view_menu
"apps/utilities-system-monitor", # Icon_EQ
"../docs/logo/rockbox-clef.svg" # Icon_Rockbox
"./tango-svg/audio-x-generic", # Icon_Audio
"./tango-svg/folder", # Icon_Folder
"./tango-svg/format-indent-more", # Icon_Playlist
"./new_icons-svg/media-playback-start-green", # Icon_Cursor ###
"./tango-svg/preferences-desktop-wallpaper", # Icon_Wps
"./tango-svg/media-flash", # Icon_Firmware ###
"./tango-svg/preferences-desktop-font", # Icon_Font
"./tango-svg/preferences-desktop-locale", # Icon_Language
"./tango-svg/preferences-system", # Icon_Config
"./tango-svg/software-update-available", # Icon_Plugin
"./tango-svg/bookmark-new", # Icon_Bookmark
"./tango-svg/start-here", # Icon_Preset
"./tango-svg/go-jump", # Icon_Queued
"./tango-svg/go-next", # Icon_Moving
"./tango-svg/input-keyboard", # Icon_Keyboard
"./tango-svg/go-previous", # Icon_Reverse_Cursor
"./tango-svg/help-browser", # Icon_Questionmark
"./tango-svg/document-properties", # Icon_Menu_setting
"./tango-svg/applications-other", # Icon_Menu_functioncall
"./tango-svg/list-add", # Icon_Submenu
"./tango-svg/preferences-system", # Icon_Submenu_Entered
"./tango-svg/media-record", # Icon_Recording
"./new_icons-svg/face-shout", # Icon_Voice ###
"./tango-svg/preferences-desktop", # Icon_General_settings_menu
"./tango-svg/emblem-system", # Icon_System_menu
"./tango-svg/media-playback-start", # Icon_Playback_menu
"./tango-svg/video-display", # Icon_Display_menu
"./tango-svg/network-receive", # Icon_Remote_Display_menu
"./tango-svg/network-wireless", # Icon_Radio_screen ###
"./tango-svg/system-file-manager", # Icon_file_view_menu
"./tango-svg/utilities-system-monitor", # Icon_EQ
"../docs/logo/rockbox-clef" # Icon_Rockbox
);
my @iconlist_viewers = (
"./tango-svg/applications-graphics", # bmp
"./tango-svg/applications-multimedia", # mpeg
"./tango-svg/applications-other", # ch8, tap, sna, tzx, z80
"./tango-svg/audio-x-generic", # mp3, mid, rmi, wav
"./tango-svg/format-justify-left", # txt, nfo
"./tango-svg/text-x-generic-template", # ss
"./mint-x-svg/applications-games", # gb, gbc
"./tango-svg/image-x-generic", # jpg, jpe, jpeg
"./tango-svg/format-indent-more", # m3u
"./mint-x-svg/gnome-glchess", # pgn
"./tango-svg/dialog-information", # zzz
);
if($#ARGV < 1) {
print "Usage: $0 <path to iconset> <size>\n";
my $help;
my $do_viewers;
my $tangopath="";
my $size;
my @list = @iconlist;
my $output = "tango_icons";
GetOptions ( 'v' => \$do_viewers,
't|tango-path=s' => \$tangopath,
'o|output=s' => \$output,
'h|help' => \$help,
);
if($#ARGV != 0 or $help) {
print "Usage: $0 [-v] [-t <path to iconset>] [-o <output prefix>] SIZE\n";
print "\n";
print "\t-v\tGenerate viewer icons\n";
print "\t-t\tPath to source of tango iconset if required\n";
print "\t-t\tPath to source of tango iconset if required\n";
print "\t-o\tUse <output prefix> instead of \"tango_icons\" for the output filename\n";
print "\n";
print "\tSIZE can be in the form of NN or NNxNN and will be used for the output filename\n";
exit();
}
my $tangopath = $ARGV[0];
my $size = $ARGV[1];
$size = $ARGV[0];
if ($do_viewers) {
$output .= "_viewers";
@list = @iconlist_viewers;
}
# temporary files
my $alphatemp = File::Temp->new(SUFFIX => ".png");
my $alphatempfname = $alphatemp->filename();
@ -75,7 +117,7 @@ my $exporttempfname = $exporttemp->filename();
my $tempstrip = File::Temp->new(SUFFIX => ".png");
my $tempstripfname = $tempstrip->filename();
my $newoutput = "tango_icons.$size.bmp";
my $newoutput = "$output.$size.bmp";
if(-e $newoutput) {
die("output file $newoutput does already exist!");
@ -85,23 +127,29 @@ print "Creating icon strip as $newoutput\n\n";
my $count;
$count = 0;
foreach(@iconlist) {
foreach(@list) {
print "processing $_ ...\n";
my $file;
if(m/^$/) {
# if nothing is defined make it empty / transparent
my $s = $size . "x" . $size;
`convert -size $s xc:"#f0f" $exporttempfname`
`convert -size $s xc:"#ff00ff" -alpha transparent $exporttempfname`
}
elsif(m/\.\./) {
elsif(m/\./) {
# icon is inside the Rockbox tree
$file = $_;
$file = $_ . ".svg";
`inkscape --export-png=$exporttempfname --export-width=$size --export-height=$size $file`
}
else {
# icon is inside the tango tree
if ($tangopath eq "") {
print "Path to tango sources needed but not given!\n";
exit(1);
}
$file = "$tangopath/scalable/" . $_ . ".svg";
`inkscape --export-png=$exporttempfname --export-width=$size --export-height=$size $file`
#~ `inkscape --export-png=$exporttempfname --export-width=$size --export-height=$size $file`
`cp $file tango-svg/`;
}
if($count != 0) {
`convert -append $tempstripfname $exporttempfname $tempstripfname`;
@ -111,10 +159,7 @@ foreach(@iconlist) {
}
$count++;
}
print "masking and converting result ...\n";
# create mask
`convert $tempstripfname -alpha extract -monochrome -negate -alpha copy -colorize 0,100,0 $alphatempfname`;
# combine mask with image and drop transparency and scale down
`convert -composite $tempstripfname $alphatempfname -flatten -background '#f0f' -alpha off $newoutput`;
print "done!\n";
print "Converting result ...\n";
`convert $tempstripfname $newoutput`;
print "Done!\n";

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
icons/tango-svg/folder.svg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
icons/tango-svg/go-jump.svg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
icons/tango-svg/go-next.svg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
icons/tango_icons.12x12.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
icons/tango_icons.16x16.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
icons/tango_icons.24x24.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
icons/tango_icons.32x32.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

View file

@ -102,38 +102,38 @@ selector type.160x128x2: bar (inverse)
selector type.138x110x2: bar (inverse)
#icons
iconset.800x480x16: icons/tango_small.bmp
iconset.480x800x16: icons/tango_small.bmp
iconset.320x480x16: icons/tango_small.bmp
iconset.320x240x16: icons/tango_small.bmp
iconset.128x128x16: icons/tango_small.bmp
iconset.128x160x16: icons/tango_small.bmp
iconset.132x80x16: icons/tango_small.bmp
iconset.138x110x2: icons/tango_small_mono.bmp
iconset.160x128x16: icons/tango_small.bmp
iconset.160x128x2: icons/tango_small_mono.bmp
iconset.176x132x16: icons/tango_small.bmp
iconset.176x220x16: icons/tango_small.bmp
iconset.220x176x16: icons/tango_small.bmp
iconset.240x320x16: icons/tango_small.bmp
iconset.240x400x16: icons/tango_small.bmp
iconset.800x480x16: icons/tango_icons.32x32.bmp
iconset.480x800x16: icons/tango_icons.32x32.bmp
iconset.320x480x16: icons/tango_icons.24x24.bmp
iconset.320x240x16: icons/tango_icons.16x16.bmp
iconset.128x128x16: icons/tango_icons.12x12.bmp
iconset.128x160x16: icons/tango_icons.12x12.bmp
iconset.132x80x16: icons/tango_icons.12x12.bmp
iconset.138x110x2: icons/tango_small_mono.bmp
iconset.160x128x16: icons/tango_icons.12x12.bmp
iconset.160x128x2: icons/tango_small_mono.bmp
iconset.176x132x16: icons/tango_icons.12x12.bmp
iconset.176x220x16: icons/tango_icons.12x12.bmp
iconset.220x176x16: icons/tango_icons.12x12.bmp
iconset.240x320x16: icons/tango_icons.16x16.bmp
iconset.240x400x16: icons/tango_icons.16x16.bmp
#viewer icons
viewers iconset.800x480x16: icons/tango_small_viewers.bmp
viewers iconset.480x800x16: icons/tango_small_viewers.bmp
viewers iconset.320x480x16: icons/tango_small_viewers.bmp
viewers iconset.320x240x16: icons/tango_small_viewers.bmp
viewers iconset.128x128x16: icons/tango_small_viewers.bmp
viewers iconset.128x160x16: icons/tango_small_viewers.bmp
viewers iconset.132x80x16: icons/tango_small_viewers.bmp
viewers iconset.138x110x2: icons/tango_small_viewers_mono.bmp
viewers iconset.160x128x16: icons/tango_small_viewers.bmp
viewers iconset.160x128x2: icons/tango_small_viewers_mono.bmp
viewers iconset.176x132x16: icons/tango_small_viewers.bmp
viewers iconset.176x220x16: icons/tango_small_viewers.bmp
viewers iconset.220x176x16: icons/tango_small_viewers.bmp
viewers iconset.240x320x16: icons/tango_small_viewers.bmp
viewers iconset.240x400x16: icons/tango_small_viewers.bmp
viewers iconset.800x480x16: icons/tango_icons_viewers.32x32.bmp
viewers iconset.480x800x16: icons/tango_icons_viewers.32x32.bmp
viewers iconset.320x480x16: icons/tango_icons_viewers.24x24.bmp
viewers iconset.320x240x16: icons/tango_icons_viewers.16x16.bmp
viewers iconset.128x128x16: icons/tango_icons_viewers.12x12.bmp
viewers iconset.128x160x16: icons/tango_icons_viewers.12x12.bmp
viewers iconset.132x80x16: icons/tango_icons_viewers.12x12.bmp
viewers iconset.138x110x2: icons/tango_small_viewers_mono.bmp
viewers iconset.160x128x16: icons/tango_icons_viewers.12x12.bmp
viewers iconset.160x128x2: icons/tango_small_viewers_mono.bmp
viewers iconset.176x132x16: icons/tango_icons_viewers.12x12.bmp
viewers iconset.176x220x16: icons/tango_icons_viewers.12x12.bmp
viewers iconset.220x176x16: icons/tango_icons_viewers.12x12.bmp
viewers iconset.240x320x16: icons/tango_icons_viewers.16x16.bmp
viewers iconset.240x400x16: icons/tango_icons_viewers.16x16.bmp
# Whether the WPS is designed to have the statusbar on or off
Statusbar: top