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
This commit is contained in:
Matthias Clasen
2016-08-25 07:48:20 -04:00
parent 9f57fe9960
commit f53706b003

View File

@@ -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);