summaryrefslogtreecommitdiff
path: root/gtk/gtkcellrenderertext.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2016-08-25 07:48:20 -0400
committerMatthias Clasen <mclasen@redhat.com>2016-08-25 07:53:32 -0400
commitf53706b0033d4fdb1d4a4daf106548d7187e0e2c (patch)
treed1e5b6070e6d0d1b5eb100ce75fc017fbdaff363 /gtk/gtkcellrenderertext.c
parent9f57fe9960b419fce2000ff2509f265912757ec3 (diff)
downloadgtk+-f53706b0033d4fdb1d4a4daf106548d7187e0e2c.tar.gz
cell renderer text: Allow entries to shrink
Set a small max-width on entries used for editing cells, so they adapt to small columns and don't overlap the next column. https://bugzilla.gnome.org/show_bug.cgi?id=770374
Diffstat (limited to 'gtk/gtkcellrenderertext.c')
-rw-r--r--gtk/gtkcellrenderertext.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c
index fe873db631..bd8b902dea 100644
--- a/gtk/gtkcellrenderertext.c
+++ b/gtk/gtkcellrenderertext.c
@@ -2024,6 +2024,7 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell,
gtk_entry_set_has_frame (GTK_ENTRY (priv->entry), FALSE);
gtk_entry_set_alignment (GTK_ENTRY (priv->entry), xalign);
+ gtk_entry_set_width_chars (GTK_ENTRY (priv->entry), 5);
if (priv->text)
gtk_entry_set_text (GTK_ENTRY (priv->entry), priv->text);