app: fix empty display unstable-version message

This commit is contained in:
Ell 2018-05-06 18:22:39 -04:00 committed by Michael Natterer
parent 119b15d439
commit 6e76cdf4d3
1 changed files with 13 additions and 6 deletions

View File

@ -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);