imtk

diff src/draw.c @ 15:6893b4dca5a3

added gradients on the selection
author John Tsiombikas <nuclear@siggraph.org>
date Tue, 19 Apr 2011 05:10:09 +0300
parents df2bc9406561
children 737e9047d9c9
line diff
     1.1 --- a/src/draw.c	Tue Apr 19 03:01:46 2011 +0300
     1.2 +++ b/src/draw.c	Tue Apr 19 05:10:09 2011 +0300
     1.3 @@ -13,11 +13,11 @@
     1.4  	{0.9, 0.9, 0.9, 1.0},		/* lit bevel */
     1.5  	{0.3, 0.3, 0.3, 1.0},		/* shadowed bevel */
     1.6  	{0.8, 0.25, 0.18, 1.0},		/* cursor color */
     1.7 -	{0.4, 0.5, 0.9, 1.0},		/* selection color */
     1.8 +	{0.68, 0.85, 1.3, 1.0},		/* selection color */
     1.9  	{0.75, 0.1, 0.095, 1.0}		/* check color */
    1.10  };
    1.11  
    1.12 -static float focus_factor = 1.1;
    1.13 +static float focus_factor = 1.15;
    1.14  static float press_factor = 0.8;
    1.15  static float alpha = 1.0;
    1.16  static float bevel = 1.0;
    1.17 @@ -49,6 +49,11 @@
    1.18  		ret[1] *= press_factor;
    1.19  		ret[2] *= press_factor;
    1.20  	}
    1.21 +	if(col & IMTK_SEL_BIT) {
    1.22 +		ret[0] *= colors[IMTK_SELECTION_COLOR][0];
    1.23 +		ret[1] *= colors[IMTK_SELECTION_COLOR][1];
    1.24 +		ret[2] *= colors[IMTK_SELECTION_COLOR][2];
    1.25 +	}
    1.26  	ret[3] *= alpha;
    1.27  	return ret;
    1.28  }