Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

IGB, like all software with a graphic user interface, uses icons to depict actions. Commonly icons are square. As of this writing, common sizes are 16, 22, 32, 48, 64, and 128. IGB uses 16x16 icons for actions that appear in menus. 22x22 icons are used for the toolbar. Some actions can appear in either place and have both icon sizes. Icons meant for menu items are added to actions with the SMALL_ICON key. Icons for the toolbar are added with the LARGE_ICON_KEY. Icons are kept in core/jar_extensions/icons/resources/. Icons in there are put into the correct places in the correct jar for distribution. ant-build includes this.

For example:

Code Block
ourAction.setValue(Action.SMALL_ICON,     '16x16/actions/ouraction.png');
ourAction.setValue(Action.LARGE_ICON_KEY, '22x22/actions/ouraction.png');

Since actions can be disabled they should still be somewhat recognizable when disabled. Swing will gray out the icon, but this will be too dark and make the icon just look like a dark gray patch. To compensate, it can help to design the icons using the alpha channel to make them translucent. Backgrounds for the icon should be transparent. Other elements that should fade into the background can be made to match the expected background color, but with an alpha value (transparency) of about 25%. This will result in those elements being grayer when disabled, but not totally washed out. The background color for both Windows and OS X is 238,238,238 as of this writing. So we cheat and use that color (with an alpha of 25%).

As an illustration, here are some IGB icons as of this writing: