WINGs: Option for decimal or hexadecimal RGB colors
commita325624b4a75e29bc4db29ad6fe572ed8bca61ac
authorDoug Torrance <dtorrance@monmouthcollege.edu>
Sun, 11 May 2014 08:34:34 +0000 (11 03:34 -0500)
committerCarlos R. Mafra <crmafra@gmail.com>
Sat, 17 May 2014 14:59:47 +0000 (17 15:59 +0100)
treeb8ec4fd59e26a17ec4e9d8ffdbbb5bd911cea4f4
parentd9b15a23118ae2b87571d5ee76651c43e348dd91
WINGs: Option for decimal or hexadecimal RGB colors

The RGB panel of the WINGs color panel lists the red, green, and blue values as
base 10 numbers.  However, hexadecimal numbers are very common when dealing with
RGB colors.  This patch adds two radio buttons at the bottom of the RGB panel
to allow users to choose their preferred number system.

For version 2 of the patch:

Based on Cristophe's suggestions regarding the new decimal/hexadecimal RGB color
feature introduced in commit 83d8ad6, this patch changes rgbState from an int
to an enum, converts some if statements to switches, and changes from atoi to
strtol for the base 10 string conversion.

In addition, the "hexadecimal" text was too wide for the default size of its
radio button for some fonts, so both radio buttons are now resized to fit the
width of the panel.
WINGs/wcolorpanel.c