| 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) |