[gtk+] cell renderer text: Allow entries to shrink



commit f53706b0033d4fdb1d4a4daf106548d7187e0e2c
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Aug 25 07:48:20 2016 -0400

    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

 gtk/gtkcellrenderertext.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c
index fe873db..bd8b902 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]