From 2c37bfca42ec6da329df952dd365d99ca004bcab Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 4 Apr 2016 11:49:05 +0100 Subject: [PATCH] GTK 3: tweak margin below the gtkask drawing areas. 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/unix/gtkask.c b/unix/gtkask.c index 47ff1a92..c2b582e9 100644 --- a/unix/gtkask.c +++ b/unix/gtkask.c @@ -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;