mirror of https://github.com/GNOME/gimp.git
libgimpwidgets: tooltips no longer require an event box around no-window widgets
This commit is contained in:
parent
1f398549e2
commit
be3ebbb65c
|
@ -137,7 +137,6 @@ gimp_scale_entry_new_internal (gboolean color_scale,
|
|||
const gchar *help_id)
|
||||
{
|
||||
GtkWidget *label;
|
||||
GtkWidget *ebox;
|
||||
GtkWidget *scale;
|
||||
GtkWidget *spinbutton;
|
||||
GtkObject *adjustment;
|
||||
|
@ -145,27 +144,9 @@ gimp_scale_entry_new_internal (gboolean color_scale,
|
|||
|
||||
label = gtk_label_new_with_mnemonic (text);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
|
||||
if (tooltip)
|
||||
{
|
||||
ebox = g_object_new (GTK_TYPE_EVENT_BOX,
|
||||
"visible-window", FALSE,
|
||||
NULL);
|
||||
gtk_table_attach (GTK_TABLE (table), ebox,
|
||||
column, column + 1, row, row + 1,
|
||||
GTK_FILL, GTK_FILL, 0, 0);
|
||||
gtk_widget_show (ebox);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (ebox), label);
|
||||
}
|
||||
else
|
||||
{
|
||||
ebox = NULL;
|
||||
gtk_table_attach (GTK_TABLE (table), label,
|
||||
column, column + 1, row, row + 1,
|
||||
GTK_FILL, GTK_FILL, 0, 0);
|
||||
}
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table), label,
|
||||
column, column + 1, row, row + 1,
|
||||
GTK_FILL, GTK_FILL, 0, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
if (! constrain &&
|
||||
|
@ -246,9 +227,7 @@ gimp_scale_entry_new_internal (gboolean color_scale,
|
|||
|
||||
if (tooltip || help_id)
|
||||
{
|
||||
if (ebox)
|
||||
gimp_help_set_help_data (ebox, tooltip, help_id);
|
||||
|
||||
gimp_help_set_help_data (label, tooltip, help_id);
|
||||
gimp_help_set_help_data (scale, tooltip, help_id);
|
||||
gimp_help_set_help_data (spinbutton, tooltip, help_id);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue