ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/init.C
(Generate patch)

Comparing rxvt-unicode/src/init.C (file contents):
Revision 1.12 by pcg, Thu Dec 18 00:29:29 2003 UTC vs.
Revision 1.13 by pcg, Thu Dec 18 02:07:12 2003 UTC

1/*--------------------------------*-C-*---------------------------------* 1/*--------------------------------*-C-*---------------------------------*
2 * File: init.c 2 * File: init.c
3 *----------------------------------------------------------------------* 3 *----------------------------------------------------------------------*
4 * $Id: init.C,v 1.12 2003/12/18 00:29:29 pcg Exp $ 4 * $Id: init.C,v 1.13 2003/12/18 02:07:12 pcg Exp $
5 * 5 *
6 * All portions of code are copyright by their respective author/s. 6 * All portions of code are copyright by their respective author/s.
7 * Copyright (c) 1992 John Bovey, University of Kent at Canterbury <jdb@ukc.ac.uk> 7 * Copyright (c) 1992 John Bovey, University of Kent at Canterbury <jdb@ukc.ac.uk>
8 * - original version 8 * - original version
9 * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> 9 * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com>
1003 * xcol[1] == top shadow 1003 * xcol[1] == top shadow
1004 * xcol[2] == bot shadow */ 1004 * xcol[2] == bot shadow */
1005 1005
1006 xcol[1] = R->PixColors[Color_scroll]; 1006 xcol[1] = R->PixColors[Color_scroll];
1007# ifdef PREFER_24BIT 1007# ifdef PREFER_24BIT
1008 1008 xcol[0].set (R, 65535, 65535, 65535);
1009 xcol[0].set (r, -1, -1, -1);
1010 /* XFreeColors(R->Xdisplay, XCMAP, &(xcol[0].pixel), 1, ~0); */ 1009 /* XFreeColors(R->Xdisplay, XCMAP, &(xcol[0].pixel), 1, ~0); */
1011# else 1010# else
1012
1013 xcol[0].set (WhitePixel(R->Xdisplay, Xscreen)); 1011 xcol[0].set (WhitePixel(R->Xdisplay, Xscreen));
1014# endif 1012# endif
1015 1013
1016 unsigned short R1, G1, B1, R0, G0, B0; 1014 unsigned short pr1, pg1, pb1, pr0, pg0, pb0;
1017 1015
1018 xcol[0].get (r, R0, G0, B0); 1016 xcol[0].get (R, pr0, pg0, pb0);
1019 xcol[1].get (r, R1, G1, B1); 1017 xcol[1].get (R, pr1, pg1, pb1);
1020 1018
1021 /* bottomShadowColor */ 1019 /* bottomShadowColor */
1022 if (!xcol[2].set (aR_ R1 / 2, G1 / 2, B1 / 2)) 1020 if (!xcol[2].set (aR_ pr1 / 2, pg1 / 2, pb1 / 2))
1023 xcol[2] = R->PixColors[Color_Black]; 1021 xcol[2] = R->PixColors[Color_Black];
1024 1022
1025 R->PixColors[Color_bottomShadow] = xcol[2]; 1023 R->PixColors[Color_bottomShadow] = xcol[2];
1026 1024
1027 /* topShadowColor */ 1025 /* topShadowColor */
1028 if (!xcol[1].set (aR_ 1026 if (!xcol[1].set (aR_
1029 min (R0, max (R0 / 5, R1) * 7 / 5), 1027 min (pr0, max (pr0 / 5, pr1) * 7 / 5),
1030 min (G0, max (G0 / 5, G1) * 7 / 5), 1028 min (pg0, max (pg0 / 5, pg1) * 7 / 5),
1031 min (B0, max (B0 / 5, B1) * 7 / 5))) 1029 min (pb0, max (pb0 / 5, pb1) * 7 / 5)))
1032 xcol[1] = R->PixColors[Color_White]; 1030 xcol[1] = R->PixColors[Color_White];
1033 1031
1034 R->PixColors[Color_topShadow] = xcol[1]; 1032 R->PixColors[Color_topShadow] = xcol[1];
1035 } 1033 }
1036#endif /* KEEP_SCROLLCOLOR */ 1034#endif /* KEEP_SCROLLCOLOR */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines