[gimp] Bug 598344 - Make 'Current' and 'Old' colors in color selector adjacent
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Bug 598344 - Make 'Current' and 'Old' colors in color selector adjacent
- Date: Sat, 23 Jan 2010 08:29:16 +0000 (UTC)
commit 6522fdc9b7f7616f4cd07ddb2aa7bb5a807c8d2f
Author: Kretynofil <kretynofil gazeta pl>
Date: Sat Jan 23 09:28:49 2010 +0100
Bug 598344 - Make 'Current' and 'Old' colors in color selector adjacent
Make the color selector more slick by removing some UI cruft and
putting the 'Current' and 'Old' color fields right next to each other.
libgimpwidgets/gimpcolorselection.c | 29 +++++++++--------------------
1 files changed, 9 insertions(+), 20 deletions(-)
---
diff --git a/libgimpwidgets/gimpcolorselection.c b/libgimpwidgets/gimpcolorselection.c
index 20a3350..a484e6e 100644
--- a/libgimpwidgets/gimpcolorselection.c
+++ b/libgimpwidgets/gimpcolorselection.c
@@ -141,7 +141,6 @@ static void
gimp_color_selection_init (GimpColorSelection *selection)
{
GtkWidget *main_hbox;
- GtkWidget *frame;
GtkWidget *table;
GtkWidget *hbox;
GtkWidget *label;
@@ -195,27 +194,22 @@ gimp_color_selection_init (GimpColorSelection *selection)
/* The table for the color_areas */
table = gtk_table_new (2, 2, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), 2);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 0);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_box_pack_end (GTK_BOX (selection->left_vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
/* The new color area */
- frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
- gtk_widget_set_size_request (frame, -1, COLOR_AREA_SIZE);
-
- gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
- _("Current:"), 1.0, 0.5,
- frame, 1, FALSE);
-
selection->new_color = gimp_color_area_new (&selection->rgb,
selection->show_alpha ?
GIMP_COLOR_AREA_SMALL_CHECKS :
GIMP_COLOR_AREA_FLAT,
GDK_BUTTON1_MASK |
GDK_BUTTON2_MASK);
- gtk_container_add (GTK_CONTAINER (frame), selection->new_color);
+ gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
+ _("Current:"), 1.0, 0.5,
+ selection->new_color, 1,
+ FALSE);
gtk_widget_show (selection->new_color);
g_signal_connect (selection->new_color, "color-changed",
@@ -223,22 +217,17 @@ gimp_color_selection_init (GimpColorSelection *selection)
selection);
/* The old color area */
- frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
- gtk_widget_set_size_request (frame, -1, COLOR_AREA_SIZE);
-
- gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
- _("Old:"), 1.0, 0.5,
- frame, 1, FALSE);
-
selection->old_color = gimp_color_area_new (&selection->rgb,
selection->show_alpha ?
GIMP_COLOR_AREA_SMALL_CHECKS :
GIMP_COLOR_AREA_FLAT,
GDK_BUTTON1_MASK |
GDK_BUTTON2_MASK);
+ gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
+ _("Old:"), 1.0, 0.5,
+ selection->old_color, 1, FALSE);
+
gtk_drag_dest_unset (selection->old_color);
- gtk_container_add (GTK_CONTAINER (frame), selection->old_color);
gtk_widget_show (selection->old_color);
/* The right vbox with color scales */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]