• Nelson Benítez León's avatar
    gtkentry: set minimum-width to 0 instead of 150 · 45e6e0cd
    Nelson Benítez León authored
    and use 150 as natural-width.
    
    Currently there's no way for a GtkEntry to be less
    than 150px wide (apart from using "width-chars" property),
    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 [1]) or when
    you want to match the size of another widget (which is less
    than 150px) see [2] 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
    list width.
    
    Using "width-chars" property may be a workaround to obtain
    a short minimum-width for the entry, but is not a proper
    solution for the mentioned cases as you may not know how
    short your GtkEntry will be, or the fact that using "chars"
    as a width unit is not pixel accurate.
    
    Curious note: the commit that introduced the GtkEntry
    minimum-width to be 150px is from 20 years ago, see
    https://bit.ly/2ySEfK4
    
    [1] This change was already suggested by Benjamin Otte
    in a blog comment https://bit.ly/2J96wRo
    
    [2] Fixes issue evince#1002
    45e6e0cd
Name
Last commit
Last update
.gitlab/issue_templates Loading commit data...
.gitlab-ci Loading commit data...
build-aux Loading commit data...
demos Loading commit data...
docs Loading commit data...
examples Loading commit data...
gdk Loading commit data...
gsk Loading commit data...
gtk Loading commit data...
modules Loading commit data...
po Loading commit data...
po-properties Loading commit data...
subprojects Loading commit data...
tests Loading commit data...
testsuite Loading commit data...
.gitlab-ci.yml Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING Loading commit data...
NEWS Loading commit data...
NEWS.pre-1.0 Loading commit data...
NEWS.pre-2.0 Loading commit data...
NEWS.pre-3.0 Loading commit data...
README.commits.md Loading commit data...
README.md Loading commit data...
config.h.meson Loading commit data...
gtk+-4.0.pc.in Loading commit data...
gtk+-unix-print-4.0.pc.in Loading commit data...
gtk.doap Loading commit data...
make-pot Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...