[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

proposal for limiting menu icons color and size



I just installed afterstep. It came with a debian menu icon. Unfortunately, 
the icon ate up some 242 colors of my 256 color display. So when I restarted 
fvwm and this icon showed up on fvwm's menus for the first time, I got a 
suprise:  everything reverted to black and white except this one pretty icon. 

There has been some discussion on debian-devel about what size and
colormap the icons on the debian menus should use. The consensus seems to be
that icons are limited to 32x32 pixels, and a 16x16 minicon is also
provided. Also, we limit the colormap to 24 colors that are the default 
colormap for the GIMP (and are a superset of the 16 colors MS Windows uses 
for icons). Here is an xpm that has the 24 colors in it:

/* XPM */
static char *cmap3[] = {
/* width height num_colors chars_per_pixel */
"    46     2       24            1",
/* colors */
". c #000000",
"# c #ff0000",
"a c #ff00ff",
"b c #0000ff",
"c c #00ffff",
"d c #00ff00",
"e c #ffff00",
"f c #7f0000",
"g c #7f007f",
"h c #00007f",
"i c #007f7f",
"j c #007f00",
"k c #7f7f00",
"l c #191919",
"m c #333333",
"n c #4c4c4c",
"o c #666667",
"p c #7f7f7f",
"q c #999999",
"r c #b2b2b2",
"s c #cccccc",
"t c #e5e5e5",
"u c #ffffff",
/* pixels */
"..##aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuu"
"..##aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuu"
};

Joost, here is a patch for the README that comes with the menu package, that
documents all this. I've left out mini icons for now, because I'm not sure
how they will be implemented. A field could be added to the menu definitions
for mini icons, or we could add a ".mini" suffix to their names, or we could
use some other method. 

Note that I refer to cmap.xpm in the following -- Joost, if you agree with
my recommendation, cmap.xpm would be included in the menu package (probably
under /usr/doc/menu/), and would be the xpm I pasted in above.

--- README~     Sat Mar  8 16:15:38 1997
+++ README      Sat Mar  8 16:38:00 1997
@@ -371,6 +371,23 @@
 of icons files to turn too much into a mess, please put all icon
 files in /usr/X11R6/include/X11/{bitmap,pixmap}.
 
+
+Debian package maintainers should ensure that any icons they include that
+are used with the debian menus conform to the following:
+
+  1. They should be in xpm format.
+  2. They may be no larger than 32x32 pixels, although smaller sizes are ok.
+  3. They should use only the 24 colors present in cmap.xpm, which comes with
+     this package.
+  4. The background area of the icon should be transparent, if possible.
+
+If you have Imagemagick installed, you can make your icons meet requirements
+1, 2, and 3 with the following command, but you will need to edit the icon
+afterward to clean it up and make the background transparent:
+
+       # mogrify -format xpm -geometry 32x32 -map cmap.xpm <filenames>
+
+
 If you, as a system admin, don't like the icons in the menu's, simply
 remove the $%{icon} from the files in /etc/menu-methods/$wm, and 
 type "update-menus"


Reply to: