~ubuntu-branches/ubuntu/hardy/notification-daemon/hardy-proposed

« back to all changes in this revision

Viewing changes to debian/patches/01_ubuntu_theme.diff.patch

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2006-05-22 15:25:37 UTC
  • Revision ID: james.westby@ubuntu.com-20060522152537-ti22cude7xpfi0ja
Tags: 0.3.4-0ubuntu8
* debian/patches/01_ubuntu_theme.diff:
  - make sure to use a mimium width
* debian/patches/04_from_upstream_cvs_no_crop.diff:
  - don't crop icons or text when notification bubble is small 
    (ubuntu: #45632)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
4
 
@@ -204,11 +204,24 @@
5
 
        // draw border
6
 
        cairo_t *cr = gdk_cairo_create((GdkDrawable*) win->window);
7
 
 
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
13
 
+       // for the tips)
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);
21
 
+
22
 
        cairo_set_source_rgb(cr, 
23
 
-                            255.0/255.0,
24
 
-                            255.0/255.0,
25
 
-                            230.0/255.0);
26
 
+                            bg_color.red/65535.0,
27
 
+                            bg_color.green/65535.0,
28
 
+                            bg_color.blue/65535.0);
29
 
+
30
 
        draw_rounded_window(cr, 0, 0, w, h, windata);
31
 
        cairo_fill(cr);
32
 
 
33
 
@@ -341,12 +354,6 @@
34
 
        gtk_widget_set_size_request(spacer, STRIPE_WIDTH, -1);
35
 
 
36
 
        windata->summary_label = gtk_label_new(NULL);
37
 
-       /* mvo: hardcode black here, it sucks */
38
 
-       GdkColor black;
39
 
-       gdk_color_black(gdk_colormap_get_system(), &black);
40
 
-       gtk_widget_modify_fg(windata->summary_label,
41
 
-                            GTK_STATE_NORMAL, &black);
42
 
-                            
43
 
        gtk_widget_show(windata->summary_label);
44
 
 
45
 
 
46
 
@@ -387,9 +394,6 @@
47
 
        gtk_box_pack_start(GTK_BOX(windata->content_hbox), vbox, TRUE, TRUE, 0);
48
 
 
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);
52
 
-
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);