* Copyright (C) 2004 Red Hat, Inc.
*
* Author:
- * Jonathan Blandford <jrb@alum.mit.edu>
+ * Marco Pesenti Gritti <marco@gnome.org>
*
* Evince is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
#include <gtk/gtklabel.h>
#define DEFAULT_DELAY 500
-#define STICKY_DELAY 0
+#define STICKY_DELAY 500
#define STICKY_REVERT_DELAY 1000
+#define SPACE_FROM_CURSOR 10
struct _EvTooltipPrivate {
GtkWidget *label;
tooltip->priv = EV_TOOLTIP_GET_PRIVATE (tooltip);
+ gtk_widget_set_app_paintable (GTK_WIDGET (tooltip), TRUE);
+ gtk_window_set_resizable (GTK_WINDOW (tooltip), FALSE);
gtk_widget_set_name (window, "gtk-tooltips");
label = gtk_label_new (NULL);
void
ev_tooltip_set_position (EvTooltip *tooltip, int x, int y)
{
- int root_x = 0, root_y = 0;
+ int root_x, root_y;
if (tooltip->parent != NULL) {
gdk_window_get_origin (tooltip->parent->window, &root_x, &root_y);
}
- gtk_window_move (GTK_WINDOW (tooltip), x + root_x, y + root_y);
+ gtk_window_move (GTK_WINDOW (tooltip),
+ x + root_x + SPACE_FROM_CURSOR,
+ y + root_y + SPACE_FROM_CURSOR);
}
static gboolean