[gimp/gtk3-port: 361/454] app: fix empty display unstable-version message
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 361/454] app: fix empty display unstable-version message
- Date: Wed, 16 May 2018 21:51:03 +0000 (UTC)
commit 07fab9c62ea2ad92617ae0c6b53ba7ad6b510eb3
Author: Ell <ell_se yahoo com>
Date: Sun May 6 18:22:39 2018 -0400
app: fix empty display unstable-version message
app/display/gimpdisplayshell-callbacks.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-callbacks.c b/app/display/gimpdisplayshell-callbacks.c
index 38e60a3..7a2afd1 100644
--- a/app/display/gimpdisplayshell-callbacks.c
+++ b/app/display/gimpdisplayshell-callbacks.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]