changed COLOR_HISTORY_SIZE to 12 to reduce the minimum size of the color

2003-11-12  Sven Neumann  <sven@gimp.org>

	* app/gui/color-history.[ch]: changed COLOR_HISTORY_SIZE to 12 to
	reduce the minimum size of the color selector dialog.

	* app/gui/color-notebook.c (color_notebook_new): changed the
	dialog setup to not depend on COLOR_HISTORY_SIZE being 16.
This commit is contained in:
Sven Neumann 2003-11-12 14:36:50 +00:00 committed by Sven Neumann
parent 99eb1fca6b
commit bff0e2a102
6 changed files with 31 additions and 21 deletions

View File

@ -1,3 +1,11 @@
2003-11-12 Sven Neumann <sven@gimp.org>
* app/gui/color-history.[ch]: changed COLOR_HISTORY_SIZE to 12 to
reduce the minimum size of the color selector dialog.
* app/gui/color-notebook.c (color_notebook_new): changed the
dialog setup to not depend on COLOR_HISTORY_SIZE being 16.
2003-11-12 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.c
@ -37,7 +45,7 @@
2003-11-12 Sven Neumann <sven@gimp.org>
* app/gui/color-notebook.c (color_notebook_new): added a default
role used for color selectors not handled by the GimpDialogFactory.
role used for color selectors not handled by GimpDialogFactory.
Fixes bug #126783.
2003-11-12 Michael Natterer <mitch@gimp.org>

View File

@ -175,7 +175,7 @@ color_notebook_new (GimpViewable *viewable,
cnp);
/* The color history */
table = gtk_table_new (2, 9, TRUE);
table = gtk_table_new (2, 1 + COLOR_HISTORY_SIZE / 2, TRUE);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
@ -202,16 +202,18 @@ color_notebook_new (GimpViewable *viewable,
for (i = 0; i < COLOR_HISTORY_SIZE; i++)
{
GimpRGB history_color;
gint row, column;
color_history_get (i, &history_color);
button = gtk_button_new ();
gtk_widget_set_size_request (button, COLOR_AREA_SIZE, COLOR_AREA_SIZE);
column = i % (COLOR_HISTORY_SIZE / 2);
row = i / (COLOR_HISTORY_SIZE / 2);
gtk_table_attach_defaults (GTK_TABLE (table), button,
(i > 7 ? i - 8 : i) + 1,
(i > 7 ? i - 8 : i) + 2,
i > 7 ? 1 : 0,
i > 7 ? 2 : 1);
column + 1, column + 2, row, row + 1);
cnp->history[i] = gimp_color_area_new (&history_color,
GIMP_COLOR_AREA_SMALL_CHECKS,

View File

@ -32,9 +32,6 @@
#include "color-history.h"
#define COLOR_HISTORY_SIZE 16
static void color_history_init (void);
@ -152,7 +149,6 @@ color_history_add (const GimpRGB *rgb)
goto doit;
}
}
}
}

View File

@ -22,7 +22,7 @@
#ifndef __COLOR_HISTORY_H__
#define __COLOR_HISTORY_H__
#define COLOR_HISTORY_SIZE 16
#define COLOR_HISTORY_SIZE 12
gint color_history_add (const GimpRGB *rgb);

View File

@ -175,7 +175,7 @@ color_notebook_new (GimpViewable *viewable,
cnp);
/* The color history */
table = gtk_table_new (2, 9, TRUE);
table = gtk_table_new (2, 1 + COLOR_HISTORY_SIZE / 2, TRUE);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
@ -202,16 +202,18 @@ color_notebook_new (GimpViewable *viewable,
for (i = 0; i < COLOR_HISTORY_SIZE; i++)
{
GimpRGB history_color;
gint row, column;
color_history_get (i, &history_color);
button = gtk_button_new ();
gtk_widget_set_size_request (button, COLOR_AREA_SIZE, COLOR_AREA_SIZE);
column = i % (COLOR_HISTORY_SIZE / 2);
row = i / (COLOR_HISTORY_SIZE / 2);
gtk_table_attach_defaults (GTK_TABLE (table), button,
(i > 7 ? i - 8 : i) + 1,
(i > 7 ? i - 8 : i) + 2,
i > 7 ? 1 : 0,
i > 7 ? 2 : 1);
column + 1, column + 2, row, row + 1);
cnp->history[i] = gimp_color_area_new (&history_color,
GIMP_COLOR_AREA_SMALL_CHECKS,

View File

@ -175,7 +175,7 @@ color_notebook_new (GimpViewable *viewable,
cnp);
/* The color history */
table = gtk_table_new (2, 9, TRUE);
table = gtk_table_new (2, 1 + COLOR_HISTORY_SIZE / 2, TRUE);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
@ -202,16 +202,18 @@ color_notebook_new (GimpViewable *viewable,
for (i = 0; i < COLOR_HISTORY_SIZE; i++)
{
GimpRGB history_color;
gint row, column;
color_history_get (i, &history_color);
button = gtk_button_new ();
gtk_widget_set_size_request (button, COLOR_AREA_SIZE, COLOR_AREA_SIZE);
column = i % (COLOR_HISTORY_SIZE / 2);
row = i / (COLOR_HISTORY_SIZE / 2);
gtk_table_attach_defaults (GTK_TABLE (table), button,
(i > 7 ? i - 8 : i) + 1,
(i > 7 ? i - 8 : i) + 2,
i > 7 ? 1 : 0,
i > 7 ? 2 : 1);
column + 1, column + 2, row, row + 1);
cnp->history[i] = gimp_color_area_new (&history_color,
GIMP_COLOR_AREA_SMALL_CHECKS,