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



commit 3fd78441ba8fa5f2e366f8a604b9bc2520f2d9bb
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.
    
    (cherry picked from commit 45adf9d0d79b302e5bf4f1dda2b7d8dbc04d2cb8)

 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 db4c0128a8..cfcfec00bd 100644
--- a/app/widgets/gimpcoloreditor.c
+++ b/app/widgets/gimpcoloreditor.c
@@ -151,7 +151,6 @@ gimp_color_editor_init (GimpColorEditor *editor)
 {
   GtkWidget   *notebook;
   GtkWidget   *hbox;
-  GtkWidget   *vbox;
   GtkWidget   *button;
   gint         content_spacing;
   gint         button_spacing;
@@ -236,7 +235,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);
 
@@ -249,13 +248,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",
@@ -264,7 +259,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]