mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 11:32:48 -05:00
gtk-askpass: add margins on left and right of the prompt.
If the prompt got big enough to reach to the edges of the dialog box, it looked ugly without any margins. Previously I hadn't noticed, because the prompt text was never that big.
This commit is contained in:
@ -432,6 +432,13 @@ static const char *gtk_askpass_setup(struct askpass_ctx *ctx,
|
||||
gtk_label_set_line_wrap(GTK_LABEL(ctx->promptlabel), true);
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
gtk_label_set_width_chars(GTK_LABEL(ctx->promptlabel), 48);
|
||||
#endif
|
||||
int margin = string_width("MM");
|
||||
#if GTK_CHECK_VERSION(3,12,0)
|
||||
gtk_widget_set_margin_start(ctx->promptlabel, margin);
|
||||
gtk_widget_set_margin_end(ctx->promptlabel, margin);
|
||||
#else
|
||||
gtk_misc_set_padding(GTK_MISC(ctx->promptlabel), margin, 0);
|
||||
#endif
|
||||
our_dialog_add_to_content_area(GTK_WINDOW(ctx->dialog),
|
||||
ctx->promptlabel, true, true, 0);
|
||||
|
Reference in New Issue
Block a user