GtkEntry's minimum-width is hardcoded to 150px
Currently there's no way for a GtkEntry to be less
than 150px wide (apart from using
this is too much for a default
minimum-width, an app
developer may need to have a shorter
GtkEntry, for example
when the UI it's been shrunk by the user (see ) or when
you want to match the size of another widget (which is less
than 150px) see  for Evince bug on using
gtk_combo_box_new_with_model_and_entry() for PDF forms where
GtkEntry of ComboBox is too wide and doesn't match the combo
"width-chars" can be a workaround but not a proper solution for these
cases as you may not know how short your GtkEntry will be
or the fact that using "chars" as a width size unit is not
Curious note: the commit that hardcoded GtkEntry's minimum-width to be 150px is from 20 years ago, see https://bit.ly/2ySEfK4
 This change was already suggested by Benjamin Otte in a blog comment https://bit.ly/2J96wRo
 Fixes issue evince#1002 (closed)
This happens in both master and gtk-3-24 branches, I'll open MR for both.
Reproducer test program
Attached test program can be compile with:
gcc `pkg-config --cflags gtk+-3.0` -o combo_bug combo_bug.c `pkg-config --libs gtk+-3.0`
and run as:
how to reproduce? Try to resize/shrink the window so the ComboBox's entry matches the width of the longest item in list.
What happens? You cannot shrink it less than 150px as that is the default minimum-width that GtkEntry's are hardcoded to.
What should happen? You should be able to shrink the GtkEntry less than 150 px, in this case to match the width of the longest item in Combobox list.