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)
|
const gchar *help_id)
|
||||||
{
|
{
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
GtkWidget *ebox;
|
|
||||||
GtkWidget *scale;
|
GtkWidget *scale;
|
||||||
GtkWidget *spinbutton;
|
GtkWidget *spinbutton;
|
||||||
GtkObject *adjustment;
|
GtkObject *adjustment;
|
||||||
|
@ -145,27 +144,9 @@ gimp_scale_entry_new_internal (gboolean color_scale,
|
||||||
|
|
||||||
label = gtk_label_new_with_mnemonic (text);
|
label = gtk_label_new_with_mnemonic (text);
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||||
|
gtk_table_attach (GTK_TABLE (table), label,
|
||||||
if (tooltip)
|
column, column + 1, row, row + 1,
|
||||||
{
|
GTK_FILL, GTK_FILL, 0, 0);
|
||||||
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_widget_show (label);
|
gtk_widget_show (label);
|
||||||
|
|
||||||
if (! constrain &&
|
if (! constrain &&
|
||||||
|
@ -246,9 +227,7 @@ gimp_scale_entry_new_internal (gboolean color_scale,
|
||||||
|
|
||||||
if (tooltip || help_id)
|
if (tooltip || help_id)
|
||||||
{
|
{
|
||||||
if (ebox)
|
gimp_help_set_help_data (label, tooltip, help_id);
|
||||||
gimp_help_set_help_data (ebox, tooltip, help_id);
|
|
||||||
|
|
||||||
gimp_help_set_help_data (scale, tooltip, help_id);
|
gimp_help_set_help_data (scale, tooltip, help_id);
|
||||||
gimp_help_set_help_data (spinbutton, tooltip, help_id);
|
gimp_help_set_help_data (spinbutton, tooltip, help_id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue