X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fgtkcols.c;h=e8223a726e3bab89fb6357419ccf4807632dddb1;hb=095072fa46b2d7b8beafaddb2f873d2f500a1e10;hp=93ab91dfb22645bdd95c532d56886c9d82dfb9bf;hpb=76612e772d7712a22b8030363019b24e33be9c3d;p=PuTTY.git diff --git a/unix/gtkcols.c b/unix/gtkcols.c index 93ab91df..e8223a72 100644 --- a/unix/gtkcols.c +++ b/unix/gtkcols.c @@ -980,14 +980,19 @@ static gint columns_gtk3_get_nat_width(ColumnsChild *child) { gint ret; - if (GTK_IS_LABEL(child->widget) && - gtk_label_get_line_wrap(GTK_LABEL(child->widget))) { + if ((GTK_IS_LABEL(child->widget) && + gtk_label_get_line_wrap(GTK_LABEL(child->widget))) || + GTK_IS_ENTRY(child->widget)) { /* * We treat wrapping GtkLabels as a special case in this * layout class, because the whole point of those is that I * _don't_ want them to take up extra horizontal space for * long text, but instead to wrap it to whatever size is used * by the rest of the layout. + * + * GtkEntry gets similar treatment, because in OS X GTK I've + * found that it requests a natural width regardless of the + * output of gtk_entry_set_width_chars. */ gtk_widget_get_preferred_width(child->widget, &ret, NULL); } else {