1
diff -Nur notification-daemon-0.3.4/themes/ubuntu/theme.c notification-daemon-0.3.4.new/themes/ubuntu/theme.c
2
--- notification-daemon-0.3.4/themes/ubuntu/theme.c 2006-05-17 16:27:13.000000000 +0200
3
+++ notification-daemon-0.3.4.new/themes/ubuntu/theme.c 2006-05-17 16:38:46.000000000 +0200
6
cairo_t *cr = gdk_cairo_create((GdkDrawable*) win->window);
8
- // set the background color
9
+ // get the tooltip bg color and use it for the notifications
10
+ GtkTooltips *tips = gtk_tooltips_new();
11
+ // create a "fake" widget here to that we can attach the tips too
12
+ // and destory afterwards (to make sure we don't create a mem-leak
14
+ GtkWidget *fake = gtk_window_new(GTK_WINDOW_TOPLEVEL);
15
+ gtk_tooltips_set_tip(tips, fake, "","");
16
+ gtk_tooltips_force_window(tips);
17
+ gtk_widget_realize(tips->tip_window);
18
+ GtkStyle *style = gtk_widget_get_style(tips->tip_window);
19
+ GdkColor bg_color = style->bg[GTK_STATE_NORMAL];
20
+ gtk_widget_destroy(fake);
22
cairo_set_source_rgb(cr,
26
+ bg_color.red/65535.0,
27
+ bg_color.green/65535.0,
28
+ bg_color.blue/65535.0);
30
draw_rounded_window(cr, 0, 0, w, h, windata);
34
gtk_widget_set_size_request(spacer, STRIPE_WIDTH, -1);
36
windata->summary_label = gtk_label_new(NULL);
37
- /* mvo: hardcode black here, it sucks */
39
- gdk_color_black(gdk_colormap_get_system(), &black);
40
- gtk_widget_modify_fg(windata->summary_label,
41
- GTK_STATE_NORMAL, &black);
43
gtk_widget_show(windata->summary_label);
47
gtk_box_pack_start(GTK_BOX(windata->content_hbox), vbox, TRUE, TRUE, 0);
49
windata->body_label = sexy_url_label_new();
50
- /* mvo: hardcode black here, it sucks */
51
- gtk_widget_modify_fg(windata->body_label, GTK_STATE_NORMAL, &black);
53
gtk_box_pack_start(GTK_BOX(vbox), windata->body_label, TRUE, TRUE, 0);
54
gtk_misc_set_alignment(GTK_MISC(windata->body_label), 0, 0);
55
gtk_label_set_line_wrap(GTK_LABEL(windata->body_label), TRUE);