From 3d025d91eadd6d4953936db1bf1e605eb9eb441f Mon Sep 17 00:00:00 2001 From: jacob Date: Tue, 20 Jun 2006 21:10:33 +0000 Subject: [PATCH] In the config dialog, clip RGB values to [0..255] rather than reducing them mod 256. Document that the RGB values can be edited, and their range. git-svn-id: svn://svn.tartarus.org/sgt/putty@6734 cda61777-01e9-0310-a592-d414129be87e --- config.c | 4 +++- doc/config.but | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config.c b/config.c index c844e059..a2f660f4 100644 --- a/config.c +++ b/config.c @@ -564,7 +564,9 @@ static void colour_handler(union control *ctrl, void *dlg, int i, cval; dlg_editbox_get(ctrl, dlg, buf, lenof(buf)); - cval = atoi(buf) & 255; + cval = atoi(buf); + if (cval > 255) cval = 255; + if (cval < 0) cval = 0; i = dlg_listbox_index(cd->listbox, dlg); if (i >= 0) { diff --git a/doc/config.but b/doc/config.but index 80e7b801..1de6d43e 100644 --- a/doc/config.but +++ b/doc/config.but @@ -1533,7 +1533,9 @@ use the list box to select which colour you want to modify. The \i{RGB values} for that colour will appear on the right-hand side of the list box. Now, if you press the \q{Modify} button, you will be presented with a colour selector, in which you can choose a new -colour to go in place of the old one. +colour to go in place of the old one. (You may also edit the RGB +values directly in the edit boxes, if you wish; each value is an +integer from 0 to 255.) PuTTY allows you to set the \i{cursor colour}, the \i{default foreground} and \I{default background}background, and the precise shades of all the -- 2.11.0