[gimp/gimp-2-10] Issue #1633 - Palette Editor is much too wide on GIMP 2.99



commit d85932b9b767e07dc7e736eba5b4b39490007315
Author: Michael Natterer <mitch gimp org>
Date:   Thu Jun 14 12:22:49 2018 +0200

    Issue #1633 - Palette Editor is much too wide on GIMP 2.99
    
    Make the bottom-left entry request only minimal width, it expands
    anyway. Also replace the "Columns:" label by a "grid" icon and set a
    tooltip on the columns spinbutton.
    
    Addresses Issue #1223 too.
    
    (cherry picked from commit 0aa018dec2f1259cddfc6cce26f8b59745abcfe1)

 app/widgets/gimppaletteeditor.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/app/widgets/gimppaletteeditor.c b/app/widgets/gimppaletteeditor.c
index 788b155416..70af7eaff2 100644
--- a/app/widgets/gimppaletteeditor.c
+++ b/app/widgets/gimppaletteeditor.c
@@ -168,7 +168,7 @@ gimp_palette_editor_init (GimpPaletteEditor *editor)
   GimpDataEditor *data_editor = GIMP_DATA_EDITOR (editor);
   GtkWidget      *viewport;
   GtkWidget      *hbox;
-  GtkWidget      *label;
+  GtkWidget      *icon;
   GtkWidget      *spinbutton;
 
   editor->zoom_factor = 1.0;
@@ -240,6 +240,7 @@ gimp_palette_editor_init (GimpPaletteEditor *editor)
   /*  The color name entry  */
   editor->color_name = gtk_entry_new ();
   gtk_box_pack_start (GTK_BOX (hbox), editor->color_name, TRUE, TRUE, 0);
+  gtk_entry_set_width_chars (GTK_ENTRY (editor->color_name), 1);
   gtk_entry_set_text (GTK_ENTRY (editor->color_name), _("Undefined"));
   gtk_editable_set_editable (GTK_EDITABLE (editor->color_name), FALSE);
   gtk_widget_show (editor->color_name);
@@ -248,9 +249,9 @@ gimp_palette_editor_init (GimpPaletteEditor *editor)
                     G_CALLBACK (palette_editor_color_name_changed),
                     editor);
 
-  label = gtk_label_new (_("Columns:"));
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-  gtk_widget_show (label);
+  icon = gtk_image_new_from_icon_name (GIMP_ICON_GRID, GTK_ICON_SIZE_MENU);
+  gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
+  gtk_widget_show (icon);
 
   editor->columns_adj = (GtkAdjustment *)
     gtk_adjustment_new (0, 0, 64, 1, 4, 0);
@@ -259,6 +260,8 @@ gimp_palette_editor_init (GimpPaletteEditor *editor)
   gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
   gtk_widget_show (spinbutton);
 
+  gimp_help_set_help_data (spinbutton, _("Set the number of columns"), NULL);
+
   g_signal_connect (editor->columns_adj, "value-changed",
                     G_CALLBACK (palette_editor_columns_changed),
                     editor);


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