[gimp] app: pack color picker and hexadecimal entry on same line in Color dock.



commit 45adf9d0d79b302e5bf4f1dda2b7d8dbc04d2cb8
Author: Jehan <jehan girinstud io>
Date:   Tue Feb 12 13:44:01 2019 +0100

    app: pack color picker and hexadecimal entry on same line in Color dock.
    
    There was no use to pack them on 2 lines. It was just making the FG/BG
    widget overly huge, and the color picker button and hex entry very long.
    This was just ugly. Also this dock is tall enough, so packing things
    horizontally when it makes sense is better.

 app/widgets/gimpcoloreditor.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/app/widgets/gimpcoloreditor.c b/app/widgets/gimpcoloreditor.c
index 81e105f768..acb93b87c2 100644
--- a/app/widgets/gimpcoloreditor.c
+++ b/app/widgets/gimpcoloreditor.c
@@ -150,7 +150,6 @@ gimp_color_editor_init (GimpColorEditor *editor)
 {
   GtkWidget   *notebook;
   GtkWidget   *hbox;
-  GtkWidget   *vbox;
   GtkWidget   *button;
   gint         content_spacing;
   gint         button_spacing;
@@ -235,7 +234,7 @@ gimp_color_editor_init (GimpColorEditor *editor)
     }
 
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
-  gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
+  gtk_box_set_homogeneous (GTK_BOX (hbox), FALSE);
   gtk_box_pack_start (GTK_BOX (editor), hbox, FALSE, FALSE, 0);
   gtk_widget_show (hbox);
 
@@ -248,13 +247,9 @@ gimp_color_editor_init (GimpColorEditor *editor)
                     G_CALLBACK (gimp_color_editor_fg_bg_notify),
                     editor);
 
-  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
-  gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
-  gtk_widget_show (vbox);
-
   /*  The color picker  */
   button = gimp_pick_button_new ();
-  gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
   gtk_widget_show (button);
 
   g_signal_connect (button, "color-picked",
@@ -263,7 +258,7 @@ gimp_color_editor_init (GimpColorEditor *editor)
 
   /*  The hex triplet entry  */
   editor->hex_entry = gimp_color_hex_entry_new ();
-  gtk_box_pack_end (GTK_BOX (vbox), editor->hex_entry, FALSE, FALSE, 0);
+  gtk_box_pack_end (GTK_BOX (hbox), editor->hex_entry, TRUE, TRUE, 0);
   gtk_widget_show (editor->hex_entry);
 
   g_signal_connect (editor->hex_entry, "color-changed",


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