diff options
author | Nelson Benítez León <nbenitezl@gmail.com> | 2018-10-21 22:20:09 +0500 |
---|---|---|
committer | Nelson Benítez León <nbenitezl@gmail.com> | 2018-10-21 22:20:09 +0500 |
commit | 9493e94376eb2173fa67c1b78f86f0d8213d6754 (patch) | |
tree | 57d528257cbde692edc9dbf34e1f32a9fa8d247c | |
parent | 615fa7cfb6660b02e6c4e9dfded8ead327e89f5b (diff) | |
download | gtk+-1422-gtkentry-s-minimum-width-is-hardcoded-to-150px-GTK3-combo-workaround.tar.gz |
gtkcombobox: in has-entry case, allow entry be shorter that 150px1422-gtkentry-s-minimum-width-is-hardcoded-to-150px-GTK3-combo-workaround
When "has-entry" is true (GtkCombobox has an editable GtkEntry)
allow the GtkEntry to be shorter than 150px and thus match the
ComboBox width when this is shorter than 150px.
This fixes evince#1002 by work around the issue gtk#1422 for the
GtkComboBox case.
-rw-r--r-- | gtk/gtkcombobox.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index e6589b4c90..966b30e7fc 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -1629,6 +1629,10 @@ gtk_combo_box_create_child (GtkComboBox *combo_box) entry = gtk_entry_new (); gtk_widget_show (entry); + /* This sets GtkEntry's minimum-width to be 1 char long, short enough + * to workaround gtk issue gtk#1422 . Also fixes evince#1002 */ + gtk_entry_set_width_chars (GTK_ENTRY (entry), 1); + gtk_container_add (GTK_CONTAINER (combo_box), entry); context = gtk_widget_get_style_context (GTK_WIDGET (entry)); |