03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 14.3<br />

As you can see above, when built into a UIQ application, the button's icon has a surrounding<br />

border. Because of this, and the fact that the button bar also has additional margins, you<br />

cannot create icons higher than 14 pixels in order for them to be fully visible in a UIQ button<br />

bar.<br />

When it comes to color support for the bitmaps, it's important to bear in mind the fact that<br />

UIQ supports different color depths for items shown on screen. Symbian OS provides<br />

support from 1-bit color up to 24-bit color, and individual phones will vary in terms of the<br />

color depth supported by their hardware.<br />

Most current Symbian OS phones support 12-bit color (2ˆ12 = 4,096 colors) on screen.<br />

However, there is a trade-off between battery-life and RAM usage. Higher color depth<br />

images (and icons) consume more power when displayed, occupy more disk space when<br />

stored and use more RAM when loaded. For this reason, most UIQ icons use an 8-bit color<br />

depth (giving 2ˆ8 = 256 colors), striking a suitable balance between aesthetics and file<br />

size/power consumption. As a general guide, unless you have a specific reason for using<br />

more colors, your icons and images should use 256 colors, or fewer, on UIQ.<br />

Note<br />

In general, these bitmap icons are easy to produce and at this stage you<br />

don't need to spend too much time on them; simply create them using Paint<br />

Shop Pro or another equally suitable graphics package.<br />

For the purpose of adding buttons to our HelloGUI example application, we have created<br />

three icons with corresponding icon masks and placed them in the source folder within the<br />

HelloGUIfull example directory. These are named:<br />

� icon and iconmask<br />

� icon2 and icon2mask<br />

� icon3 and icon3mask.<br />

Altogether then, there are six bitmaps to be turned into a single .mbm file, along with its<br />

associated .mbg.<br />

14.1.2 Converting the Bitmaps<br />

Now that we have dealt with the bitmaps, the next step is to add the bitmap conversion<br />

information to the application build process for HelloGUI. You do this by including the<br />

following text in the project's .mmp file:<br />

START BITMAP Hellogui.mbm<br />

HEADER<br />

SOURCEPATH ..\src<br />

SOURCE c8 icon.bmp<br />

SOURCE 1 iconmask.bmp<br />

SOURCE c8 icon2.bmp

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!