pidgin/gtkutils.c

changeset 40094
8e6d91e4dd8f
parent 40062
d25228fc7b8e
child 40125
a7acc7b00d79
child 40133
b86418d6eb94
equal deleted inserted replaced
40093:dd7183cf0a71 40094:8e6d91e4dd8f
2423 gtk_style_context_get_color(context, gtk_style_context_get_state(context), 2423 gtk_style_context_get_color(context, gtk_style_context_get_state(context),
2424 &fg); 2424 &fg);
2425 gtk_style_context_get_background_color(context, 2425 gtk_style_context_get_background_color(context,
2426 gtk_style_context_get_state(context), 2426 gtk_style_context_get_state(context),
2427 &bg); 2427 &bg);
2428 snprintf(dim_grey_string, sizeof(dim_grey_string), "#%02x%02x%02x", 2428 g_snprintf(dim_grey_string, sizeof(dim_grey_string), "#%02x%02x%02x",
2429 (unsigned int)((fg.red + bg.red) * 0.5 * 255), 2429 (unsigned int)((fg.red + bg.red) * 0.5 * 255),
2430 (unsigned int)((fg.green + bg.green) * 0.5 * 255), 2430 (unsigned int)((fg.green + bg.green) * 0.5 * 255),
2431 (unsigned int)((fg.blue + bg.blue) * 0.5 * 255)); 2431 (unsigned int)((fg.blue + bg.blue) * 0.5 * 255));
2432 return dim_grey_string; 2432 return dim_grey_string;
2433 } 2433 }
2434 2434
2435 static void 2435 static void
2436 combo_box_changed_cb(GtkComboBoxText *combo_box, GtkEntry *entry) 2436 combo_box_changed_cb(GtkComboBoxText *combo_box, GtkEntry *entry)

mercurial