mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
GtkAccelLabel: unconditionally chain up in draw
No need to check, we know for sure that GtkLabel has a draw function.
This commit is contained in:
parent
2ddbca7ba5
commit
73267102fd
@ -418,9 +418,7 @@ gtk_accel_label_draw (GtkWidget *widget,
|
||||
|
||||
allocation.width -= ac_width;
|
||||
gtk_widget_set_allocation (widget, &allocation);
|
||||
if (GTK_WIDGET_CLASS (gtk_accel_label_parent_class)->draw)
|
||||
GTK_WIDGET_CLASS (gtk_accel_label_parent_class)->draw (widget,
|
||||
cr);
|
||||
GTK_WIDGET_CLASS (gtk_accel_label_parent_class)->draw (widget, cr);
|
||||
allocation.width += ac_width;
|
||||
gtk_widget_set_allocation (widget, &allocation);
|
||||
if (gtk_label_get_ellipsize (label))
|
||||
@ -443,7 +441,6 @@ gtk_accel_label_draw (GtkWidget *widget,
|
||||
|
||||
gtk_style_context_save (context);
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_ACCELERATOR);
|
||||
|
||||
gtk_render_layout (context, cr, x, y, accel_layout);
|
||||
gtk_style_context_restore (context);
|
||||
|
||||
@ -451,8 +448,7 @@ gtk_accel_label_draw (GtkWidget *widget,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GTK_WIDGET_CLASS (gtk_accel_label_parent_class)->draw)
|
||||
GTK_WIDGET_CLASS (gtk_accel_label_parent_class)->draw (widget, cr);
|
||||
GTK_WIDGET_CLASS (gtk_accel_label_parent_class)->draw (widget, cr);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user