mirror of https://github.com/GNOME/gimp.git
app: fix empty display unstable-version message
This commit is contained in:
parent
119b15d439
commit
6e76cdf4d3
|
@ -525,12 +525,16 @@ gimp_display_shell_canvas_draw_drop_zone (GimpDisplayShell *shell,
|
|||
|
||||
#ifdef GIMP_UNSTABLE
|
||||
{
|
||||
PangoLayout *layout;
|
||||
gchar *msg;
|
||||
GtkAllocation allocation;
|
||||
gint width;
|
||||
gint height;
|
||||
gdouble scale;
|
||||
GtkWidget *widget = GTK_WIDGET (shell);
|
||||
GtkStyleContext *context = gtk_widget_get_style_context (widget);
|
||||
GtkStateFlags state = gtk_widget_get_state_flags (widget);
|
||||
PangoLayout *layout;
|
||||
gchar *msg;
|
||||
GtkAllocation allocation;
|
||||
gint width;
|
||||
gint height;
|
||||
gdouble scale;
|
||||
GdkRGBA color;
|
||||
|
||||
layout = gtk_widget_create_pango_layout (shell->canvas, NULL);
|
||||
|
||||
|
@ -550,6 +554,9 @@ gimp_display_shell_canvas_draw_drop_zone (GimpDisplayShell *shell,
|
|||
scale = MIN (((gdouble) allocation.width / 2.0) / (gdouble) width,
|
||||
((gdouble) allocation.height / 2.0) / (gdouble) height);
|
||||
|
||||
gtk_style_context_get_color (context, state, &color);
|
||||
gdk_cairo_set_source_rgba (cr, &color);
|
||||
|
||||
cairo_move_to (cr,
|
||||
(allocation.width - (width * scale)) / 2,
|
||||
(allocation.height - (height * scale)) / 2);
|
||||
|
|
Loading…
Reference in New Issue