diff options
Diffstat (limited to '0001-New-tooltip-style.patch')
-rw-r--r-- | 0001-New-tooltip-style.patch | 66 |
1 files changed, 26 insertions, 40 deletions
diff --git a/0001-New-tooltip-style.patch b/0001-New-tooltip-style.patch index 1c47672..9c7b53b 100644 --- a/0001-New-tooltip-style.patch +++ b/0001-New-tooltip-style.patch @@ -1,9 +1,9 @@ -diff -up gtk+-2.90.7/gtk/gtktooltip.c.fresh-tooltips gtk+-2.90.7/gtk/gtktooltip.c ---- gtk+-2.90.7/gtk/gtktooltip.c.fresh-tooltips 2010-09-10 09:05:50.000000000 -0400 -+++ gtk+-2.90.7/gtk/gtktooltip.c 2010-09-21 20:00:48.705997994 -0400 -@@ -33,6 +33,9 @@ - #include "gtkhbox.h" +diff -up gtk+-2.91.0/gtk/gtktooltip.c.fresh-tooltips gtk+-2.91.0/gtk/gtktooltip.c +--- gtk+-2.91.0/gtk/gtktooltip.c.fresh-tooltips 2010-09-27 20:40:00.000000000 -0400 ++++ gtk+-2.91.0/gtk/gtktooltip.c 2010-10-02 00:51:35.829456000 -0400 +@@ -35,6 +35,9 @@ #include "gtkalignment.h" + #include "gtksizerequest.h" +#ifdef GDK_WINDOWING_X11 +#include "gdk/x11/gdkx.h" @@ -11,7 +11,7 @@ diff -up gtk+-2.90.7/gtk/gtktooltip.c.fresh-tooltips gtk+-2.90.7/gtk/gtktooltip. #undef DEBUG_TOOLTIP -@@ -96,6 +99,7 @@ static void gtk_tooltip_display_cl +@@ -99,6 +102,7 @@ static void gtk_tooltip_display_cl GtkTooltip *tooltip); static void gtk_tooltip_set_last_window (GtkTooltip *tooltip, GdkWindow *window); @@ -19,7 +19,7 @@ diff -up gtk+-2.90.7/gtk/gtktooltip.c.fresh-tooltips gtk+-2.90.7/gtk/gtktooltip. G_DEFINE_TYPE (GtkTooltip, gtk_tooltip, G_TYPE_OBJECT); -@@ -111,6 +115,40 @@ gtk_tooltip_class_init (GtkTooltipClass +@@ -114,6 +118,40 @@ gtk_tooltip_class_init (GtkTooltipClass } static void @@ -60,7 +60,7 @@ diff -up gtk+-2.90.7/gtk/gtktooltip.c.fresh-tooltips gtk+-2.90.7/gtk/gtktooltip. gtk_tooltip_init (GtkTooltip *tooltip) { GtkStyle *style; -@@ -130,8 +168,12 @@ gtk_tooltip_init (GtkTooltip *tooltip) +@@ -133,8 +171,12 @@ gtk_tooltip_init (GtkTooltip *tooltip) tooltip->last_window = NULL; tooltip->window = g_object_ref (gtk_window_new (GTK_WINDOW_POPUP)); @@ -73,16 +73,7 @@ diff -up gtk+-2.90.7/gtk/gtktooltip.c.fresh-tooltips gtk+-2.90.7/gtk/gtktooltip. gtk_widget_set_app_paintable (tooltip->window, TRUE); gtk_window_set_resizable (GTK_WINDOW (tooltip->window), FALSE); gtk_widget_set_name (tooltip->window, "gtk-tooltip"); -@@ -148,7 +190,7 @@ gtk_tooltip_init (GtkTooltip *tooltip) - gtk_widget_show (tooltip->alignment); - - g_signal_connect_swapped (tooltip->window, "style-set", -- G_CALLBACK (gtk_tooltip_window_style_set), tooltip); -+ G_CALLBACK (gtk_tooltip_window_style_set), tooltip); - g_signal_connect_swapped (tooltip->window, "expose-event", - G_CALLBACK (gtk_tooltip_paint_window), tooltip); - -@@ -165,6 +207,13 @@ gtk_tooltip_init (GtkTooltip *tooltip) +@@ -168,6 +210,13 @@ gtk_tooltip_init (GtkTooltip *tooltip) gtk_box_pack_start (GTK_BOX (tooltip->box), tooltip->label, FALSE, FALSE, 0); @@ -96,7 +87,7 @@ diff -up gtk+-2.90.7/gtk/gtktooltip.c.fresh-tooltips gtk+-2.90.7/gtk/gtktooltip. tooltip->custom_widget = NULL; } -@@ -514,21 +563,216 @@ gtk_tooltip_window_style_set (GtkTooltip +@@ -517,19 +566,210 @@ gtk_tooltip_window_style_set (GtkTooltip gtk_widget_queue_draw (tooltip->window); } @@ -263,37 +254,33 @@ diff -up gtk+-2.90.7/gtk/gtktooltip.c.fresh-tooltips gtk+-2.90.7/gtk/gtktooltip. +} + static gboolean - gtk_tooltip_paint_window (GtkTooltip *tooltip) + gtk_tooltip_paint_window (GtkTooltip *tooltip, +- cairo_t *cr) ++ cairo_t *context) { - GtkAllocation allocation; -+ gboolean new_style; - - gtk_widget_get_allocation (tooltip->window, &allocation); - gtk_paint_flat_box (gtk_widget_get_style (tooltip->window), -- gtk_widget_get_window (tooltip->window), +- cr, - GTK_STATE_NORMAL, - GTK_SHADOW_OUT, -- NULL, - tooltip->window, - "tooltip", - 0, 0, -- allocation.width, allocation.height); +- gtk_widget_get_allocated_width (tooltip->window), +- gtk_widget_get_allocated_height (tooltip->window)); ++ gboolean new_style; + + gtk_widget_style_get (tooltip->window, "new-tooltip-style", &new_style, NULL); + + if (new_style) + { -+ cairo_t *context; + cairo_surface_t *surface; + cairo_t *cr; + -+ context = gdk_cairo_create (gtk_widget_get_window (tooltip->window)); -+ + cairo_set_operator (context, CAIRO_OPERATOR_SOURCE); + surface = cairo_surface_create_similar (cairo_get_target (context), + CAIRO_CONTENT_COLOR_ALPHA, -+ allocation.width, -+ allocation.height); ++ gtk_widget_get_allocated_width (tooltip->window), ++ gtk_widget_get_allocated_height (tooltip->window)); + cr = cairo_create (surface); + + fill_background (tooltip->window, cr); @@ -309,23 +296,22 @@ diff -up gtk+-2.90.7/gtk/gtktooltip.c.fresh-tooltips gtk+-2.90.7/gtk/gtktooltip. + else + { + gtk_paint_flat_box (gtk_widget_get_style (tooltip->window), -+ gtk_widget_get_window (tooltip->window), ++ context, + GTK_STATE_NORMAL, + GTK_SHADOW_OUT, -+ NULL, + tooltip->window, + "tooltip", + 0, 0, -+ allocation.width, -+ allocation.height); ++ gtk_widget_get_allocated_width (tooltip->window), ++ gtk_widget_get_allocated_height (tooltip->window)); + } return FALSE; } -diff -up gtk+-2.90.7/gtk/gtkwidget.c.fresh-tooltips gtk+-2.90.7/gtk/gtkwidget.c ---- gtk+-2.90.7/gtk/gtkwidget.c.fresh-tooltips 2010-09-10 09:05:50.000000000 -0400 -+++ gtk+-2.90.7/gtk/gtkwidget.c 2010-09-21 13:57:38.327302001 -0400 -@@ -2649,6 +2649,14 @@ gtk_widget_class_init (GtkWidgetClass *k +diff -up gtk+-2.91.0/gtk/gtkwidget.c.fresh-tooltips gtk+-2.91.0/gtk/gtkwidget.c +--- gtk+-2.91.0/gtk/gtkwidget.c.fresh-tooltips 2010-09-30 21:30:41.000000000 -0400 ++++ gtk+-2.91.0/gtk/gtkwidget.c 2010-10-02 00:45:18.549456000 -0400 +@@ -2891,6 +2891,14 @@ gtk_widget_class_init (GtkWidgetClass *k 1, G_MAXINT, 16, GTK_PARAM_READABLE)); |