Skip to content

Commit

Permalink
set minimum size for GtkEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
scuri committed Oct 29, 2012
1 parent f7b8f02 commit dce039b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gtk/iupgtk_list.c
Expand Up @@ -200,6 +200,8 @@ static int gtkListSetStandardFontAttrib(Ihandle* ih, const char* value)
gtk_widget_modify_font((GtkWidget*)entry, (PangoFontDescription*)iupgtkGetPangoFontDescAttrib(ih));
#endif
iupgtkFontUpdatePangoLayout(ih, gtk_entry_get_layout(entry));

gtk_entry_set_width_chars(entry, 1); /* minimum size */
}
}
return 1;
Expand Down
1 change: 1 addition & 0 deletions src/gtk/iupgtk_text.c
Expand Up @@ -1695,6 +1695,7 @@ static int gtkTextMapMethod(Ihandle* ih)
ih->data->has_formatting = 0;

gtk_entry_set_has_frame((GtkEntry*)ih->handle, IupGetInt(ih, "BORDER"));
gtk_entry_set_width_chars((GtkEntry*)ih->handle, 1); /* minimum size */

if (iupAttribGetBoolean(ih, "PASSWORD"))
gtk_entry_set_visibility((GtkEntry*)ih->handle, FALSE);
Expand Down

0 comments on commit dce039b

Please sign in to comment.