[gimp] libgimpwidgets: set a min size of 8 chars on GimpColorHexEntry



commit 0bbc2b62310e43e10b75e62da956620cf5c53b2a
Author: Michael Natterer <mitch gimp org>
Date:   Wed Feb 6 23:23:14 2013 +0100

    libgimpwidgets: set a min size of 8 chars on GimpColorHexEntry
    
    because GtkEntry's default min size is way too large for this use
    case.

 libgimpwidgets/gimpcolorhexentry.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libgimpwidgets/gimpcolorhexentry.c b/libgimpwidgets/gimpcolorhexentry.c
index 3872d51..f8da04a 100644
--- a/libgimpwidgets/gimpcolorhexentry.c
+++ b/libgimpwidgets/gimpcolorhexentry.c
@@ -100,6 +100,11 @@ gimp_color_hex_entry_init (GimpColorHexEntry *entry)
   gint                 num_colors;
   gint                 i;
 
+  /* GtkEntry's minimum size is way too large, set a reasonable one
+   * for our use case
+   */
+  gtk_entry_set_width_chars (GTK_ENTRY (entry), 8);
+
   gimp_rgba_set (&entry->color, 0.0, 0.0, 0.0, 1.0);
 
   store = gtk_list_store_new (NUM_COLUMNS, G_TYPE_STRING, GIMP_TYPE_RGB);


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