]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
GTK 3: tweak margin below the gtkask drawing areas.
authorSimon Tatham <anakin@pobox.com>
Mon, 4 Apr 2016 10:49:05 +0000 (11:49 +0100)
committerSimon Tatham <anakin@pobox.com>
Mon, 4 Apr 2016 10:52:01 +0000 (11:52 +0100)
A side effect of commit 1f9df706b seems to have been to squash those
areas right up against the bottom of the dialog box, which is ugly. I
don't fully understand why it only happens to those drawing areas and
not to buttons placed in the fake 'action area' by other dialogs, but
anyway, adding an explicit margin-bottom attribute seems to solve it.

unix/gtkask.c

index 47ff1a92f0f36f4faaa6811d0b6a226952b6f369..c2b582e9c9afe29e29a2d0befaf5c6dd3453ecca 100644 (file)
@@ -375,6 +375,12 @@ static const char *gtk_askpass_setup(struct askpass_ctx *ctx,
                          G_CALLBACK(expose_area),
                          &ctx->drawingareas[i]);
 #endif
+
+#if GTK_CHECK_VERSION(3,0,0)
+        g_object_set(G_OBJECT(ctx->drawingareas[i].area),
+                     "margin-bottom", 8, (const char *)NULL);
+#endif
+
         gtk_widget_show(ctx->drawingareas[i].area);
     }
     ctx->active_area = rand() % N_DRAWING_AREAS;