Commit 7adde1e4 authored by Kristian Rietveld's avatar Kristian Rietveld Committed by Kristian Rietveld

update alignment padding after theme changes. (Fixes #467003, patch by

2007-08-21  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (gtk_tooltip_init),
	(gtk_tooltip_window_style_set): update alignment padding after
	theme changes. (Fixes #467003, patch by Benjamin Berg).


svn path=/trunk/; revision=18667
parent ef1da5f6
2007-08-21 Kristian Rietveld <kris@imendio.com>
* gtk/gtktooltip.c (gtk_tooltip_init),
(gtk_tooltip_window_style_set): update alignment padding after
theme changes. (Fixes #467003, patch by Benjamin Berg).
2007-08-21 Kristian Rietveld <kris@imendio.com>
* gtk/gtktooltip.c (_gtk_tooltip_handle_event): always set
......
......@@ -85,6 +85,7 @@ static void gtk_tooltip_class_init (GtkTooltipClass *klass);
static void gtk_tooltip_init (GtkTooltip *tooltip);
static void gtk_tooltip_finalize (GObject *object);
static void gtk_tooltip_window_style_set (GtkTooltip *tooltip);
static gboolean gtk_tooltip_paint_window (GtkTooltip *tooltip);
static void gtk_tooltip_window_hide (GtkWidget *widget,
gpointer user_data);
......@@ -140,6 +141,8 @@ gtk_tooltip_init (GtkTooltip *tooltip)
gtk_container_add (GTK_CONTAINER (tooltip->window), tooltip->alignment);
gtk_widget_show (tooltip->alignment);
g_signal_connect_swapped (tooltip->window, "style_set",
G_CALLBACK (gtk_tooltip_window_style_set), tooltip);
g_signal_connect_swapped (tooltip->window, "expose_event",
G_CALLBACK (gtk_tooltip_paint_window), tooltip);
......@@ -410,6 +413,18 @@ gtk_tooltip_reset (GtkTooltip *tooltip)
gtk_tooltip_set_tip_area (tooltip, NULL);
}
static void
gtk_tooltip_window_style_set (GtkTooltip *tooltip)
{
gtk_alignment_set_padding (GTK_ALIGNMENT (tooltip->alignment),
tooltip->window->style->ythickness,
tooltip->window->style->ythickness,
tooltip->window->style->xthickness,
tooltip->window->style->xthickness);
gtk_widget_queue_draw (tooltip->window);
}
static gboolean
gtk_tooltip_paint_window (GtkTooltip *tooltip)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment