pidgin/gtkconv.c

changeset 38192
ca1489360439
parent 38190
3f180523eb3b
child 38299
770365ded9f8
equal deleted inserted replaced
38191:20f33f108f99 38192:ca1489360439
11244 * expensive to find colors that not only don't conflict with the background, but also do not 11244 * expensive to find colors that not only don't conflict with the background, but also do not
11245 * conflict with each other. 11245 * conflict with each other.
11246 */ 11246 */
11247 while(i < numcolors && time(NULL) < breakout_time) 11247 while(i < numcolors && time(NULL) < breakout_time)
11248 { 11248 {
11249 GdkRGBA color = {rand() % 65536 / 65535.0, rand() % 65536 / 65535.0, rand() % 65536 / 65535.0, 1}; 11249 GdkRGBA color = {g_random_double_range(0, 1), g_random_double_range(0, 1), g_random_double_range(0, 1), 1};
11250 11250
11251 if (color_is_visible(color, background, MIN_LUMINANCE_CONTRAST_RATIO) && 11251 if (color_is_visible(color, background, MIN_LUMINANCE_CONTRAST_RATIO) &&
11252 color_is_visible(color, nick_highlight, MIN_LUMINANCE_CONTRAST_RATIO) && 11252 color_is_visible(color, nick_highlight, MIN_LUMINANCE_CONTRAST_RATIO) &&
11253 color_is_visible(color, send_color, MIN_LUMINANCE_CONTRAST_RATIO)) 11253 color_is_visible(color, send_color, MIN_LUMINANCE_CONTRAST_RATIO))
11254 { 11254 {

mercurial