[gimp] Issue #1633 - Palette Editor is much too wide on GIMP 2.99
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Issue #1633 - Palette Editor is much too wide on GIMP 2.99
- Date: Thu, 14 Jun 2018 10:28:14 +0000 (UTC)
commit 0aa018dec2f1259cddfc6cce26f8b59745abcfe1
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.
app/widgets/gimppaletteeditor.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/app/widgets/gimppaletteeditor.c b/app/widgets/gimppaletteeditor.c
index 96b091766e..d1f221c8f1 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,10 @@ 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_widget_set_margin_start (icon, 2);
+ gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
+ gtk_widget_show (icon);
editor->columns_adj = gtk_adjustment_new (0, 0, 64, 1, 4, 0);
spinbutton = gtk_spin_button_new (editor->columns_adj, 1.0, 0);
@@ -258,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]