Commit 9d1a945a authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

fixed my last change

2001-01-16  Sven Neumann  <sven@gimp.org>

	* app/color_notebook.c: fixed my last change

	* libgimp/gimpcolorarea.c: swapped opaque and transparent areas
parent 5a0e9dfb
2001-01-16 Sven Neumann <sven@gimp.org>
* app/color_notebook.c: fixed my last change
* libgimp/gimpcolorarea.c: swapped opaque and transparent areas
2001-01-16 Sven Neumann <sven@gimp.org>
* libgimp/gimpcolorspace.c: fixed RGB to HSV routine
......
......@@ -408,7 +408,7 @@ color_notebook_new (GimpRGB *color,
gtk_widget_show (cnp->orig_color);
/* The color space sliders, toggle buttons and entries */
table = gtk_table_new (show_alpha ? 8 : 7, 4, FALSE);
table = gtk_table_new (8, 4, FALSE);
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, 0);
......@@ -416,7 +416,7 @@ color_notebook_new (GimpRGB *color,
gtk_widget_show (table);
group = NULL;
for (i = 0; i < (show_alpha ? 8 : 7); i++)
for (i = 0; i < (show_alpha ? 7 : 6); i++)
{
if (i == 6)
{
......@@ -455,8 +455,7 @@ color_notebook_new (GimpRGB *color,
/* The hex triplet entry */
hbox = gtk_hbox_new (FALSE, 3);
gtk_table_attach (GTK_TABLE (table), hbox, 1, 4,
show_alpha ? 8 : 7, show_alpha ? 8 : 9,
gtk_table_attach (GTK_TABLE (table), hbox, 1, 4, 8, 9,
GTK_FILL | GTK_EXPAND, GTK_EXPAND, 0, 0);
gtk_widget_show (hbox);
......@@ -735,11 +734,10 @@ color_notebook_page_switch (GtkWidget *widget,
cnp->cur_page = csel;
for (i = 0; i < 7; i++)
for (i = 0; i < 6; i++)
{
if (cnp->toggles[i])
gtk_widget_set_sensitive (cnp->toggles[i],
csel->info->methods.set_channel != NULL);
gtk_widget_set_sensitive (cnp->toggles[i],
csel->info->methods.set_channel != NULL);
}
color_notebook_update (cnp, UPDATE_CHANNEL | UPDATE_NOTEBOOK);
......@@ -1179,7 +1177,7 @@ color_history_write (FILE *fp)
for (i = 0; i < COLOR_HISTORY_SIZE; i++)
{
fprintf (fp, "\n (color %f %f %f %f)",
fprintf (fp, "\n (color %f %f %f %f)",
color_history[i].r,
color_history[i].g,
color_history[i].b,
......
......@@ -408,7 +408,7 @@ color_notebook_new (GimpRGB *color,
gtk_widget_show (cnp->orig_color);
/* The color space sliders, toggle buttons and entries */
table = gtk_table_new (show_alpha ? 8 : 7, 4, FALSE);
table = gtk_table_new (8, 4, FALSE);
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, 0);
......@@ -416,7 +416,7 @@ color_notebook_new (GimpRGB *color,
gtk_widget_show (table);
group = NULL;
for (i = 0; i < (show_alpha ? 8 : 7); i++)
for (i = 0; i < (show_alpha ? 7 : 6); i++)
{
if (i == 6)
{
......@@ -455,8 +455,7 @@ color_notebook_new (GimpRGB *color,
/* The hex triplet entry */
hbox = gtk_hbox_new (FALSE, 3);
gtk_table_attach (GTK_TABLE (table), hbox, 1, 4,
show_alpha ? 8 : 7, show_alpha ? 8 : 9,
gtk_table_attach (GTK_TABLE (table), hbox, 1, 4, 8, 9,
GTK_FILL | GTK_EXPAND, GTK_EXPAND, 0, 0);
gtk_widget_show (hbox);
......@@ -735,11 +734,10 @@ color_notebook_page_switch (GtkWidget *widget,
cnp->cur_page = csel;
for (i = 0; i < 7; i++)
for (i = 0; i < 6; i++)
{
if (cnp->toggles[i])
gtk_widget_set_sensitive (cnp->toggles[i],
csel->info->methods.set_channel != NULL);
gtk_widget_set_sensitive (cnp->toggles[i],
csel->info->methods.set_channel != NULL);
}
color_notebook_update (cnp, UPDATE_CHANNEL | UPDATE_NOTEBOOK);
......@@ -1179,7 +1177,7 @@ color_history_write (FILE *fp)
for (i = 0; i < COLOR_HISTORY_SIZE; i++)
{
fprintf (fp, "\n (color %f %f %f %f)",
fprintf (fp, "\n (color %f %f %f %f)",
color_history[i].r,
color_history[i].g,
color_history[i].b,
......
......@@ -408,7 +408,7 @@ color_notebook_new (GimpRGB *color,
gtk_widget_show (cnp->orig_color);
/* The color space sliders, toggle buttons and entries */
table = gtk_table_new (show_alpha ? 8 : 7, 4, FALSE);
table = gtk_table_new (8, 4, FALSE);
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, 0);
......@@ -416,7 +416,7 @@ color_notebook_new (GimpRGB *color,
gtk_widget_show (table);
group = NULL;
for (i = 0; i < (show_alpha ? 8 : 7); i++)
for (i = 0; i < (show_alpha ? 7 : 6); i++)
{
if (i == 6)
{
......@@ -455,8 +455,7 @@ color_notebook_new (GimpRGB *color,
/* The hex triplet entry */
hbox = gtk_hbox_new (FALSE, 3);
gtk_table_attach (GTK_TABLE (table), hbox, 1, 4,
show_alpha ? 8 : 7, show_alpha ? 8 : 9,
gtk_table_attach (GTK_TABLE (table), hbox, 1, 4, 8, 9,
GTK_FILL | GTK_EXPAND, GTK_EXPAND, 0, 0);
gtk_widget_show (hbox);
......@@ -735,11 +734,10 @@ color_notebook_page_switch (GtkWidget *widget,
cnp->cur_page = csel;
for (i = 0; i < 7; i++)
for (i = 0; i < 6; i++)
{
if (cnp->toggles[i])
gtk_widget_set_sensitive (cnp->toggles[i],
csel->info->methods.set_channel != NULL);
gtk_widget_set_sensitive (cnp->toggles[i],
csel->info->methods.set_channel != NULL);
}
color_notebook_update (cnp, UPDATE_CHANNEL | UPDATE_NOTEBOOK);
......@@ -1179,7 +1177,7 @@ color_history_write (FILE *fp)
for (i = 0; i < COLOR_HISTORY_SIZE; i++)
{
fprintf (fp, "\n (color %f %f %f %f)",
fprintf (fp, "\n (color %f %f %f %f)",
color_history[i].r,
color_history[i].g,
color_history[i].b,
......
......@@ -408,7 +408,7 @@ color_notebook_new (GimpRGB *color,
gtk_widget_show (cnp->orig_color);
/* The color space sliders, toggle buttons and entries */
table = gtk_table_new (show_alpha ? 8 : 7, 4, FALSE);
table = gtk_table_new (8, 4, FALSE);
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, 0);
......@@ -416,7 +416,7 @@ color_notebook_new (GimpRGB *color,
gtk_widget_show (table);
group = NULL;
for (i = 0; i < (show_alpha ? 8 : 7); i++)
for (i = 0; i < (show_alpha ? 7 : 6); i++)
{
if (i == 6)
{
......@@ -455,8 +455,7 @@ color_notebook_new (GimpRGB *color,
/* The hex triplet entry */
hbox = gtk_hbox_new (FALSE, 3);
gtk_table_attach (GTK_TABLE (table), hbox, 1, 4,
show_alpha ? 8 : 7, show_alpha ? 8 : 9,
gtk_table_attach (GTK_TABLE (table), hbox, 1, 4, 8, 9,
GTK_FILL | GTK_EXPAND, GTK_EXPAND, 0, 0);
gtk_widget_show (hbox);
......@@ -735,11 +734,10 @@ color_notebook_page_switch (GtkWidget *widget,
cnp->cur_page = csel;
for (i = 0; i < 7; i++)
for (i = 0; i < 6; i++)
{
if (cnp->toggles[i])
gtk_widget_set_sensitive (cnp->toggles[i],
csel->info->methods.set_channel != NULL);
gtk_widget_set_sensitive (cnp->toggles[i],
csel->info->methods.set_channel != NULL);
}
color_notebook_update (cnp, UPDATE_CHANNEL | UPDATE_NOTEBOOK);
......@@ -1179,7 +1177,7 @@ color_history_write (FILE *fp)
for (i = 0; i < COLOR_HISTORY_SIZE; i++)
{
fprintf (fp, "\n (color %f %f %f %f)",
fprintf (fp, "\n (color %f %f %f %f)",
color_history[i].r,
color_history[i].g,
color_history[i].b,
......
......@@ -344,7 +344,7 @@ gimp_color_area_update (GimpColorArea *gca)
for (x = 0; x < width; x++)
{
if (x * height < y * width)
if (x * height > y * width)
{
*p++ = opaque[0];
*p++ = opaque[1];
......@@ -353,7 +353,7 @@ gimp_color_area_update (GimpColorArea *gca)
continue;
}
frac = (gdouble) (x * height) / (gdouble) width - y;
frac = y - (gdouble) (x * height) / (gdouble) width;
if (((x / check_size) ^ (y / check_size)) & 1)
{
......
......@@ -344,7 +344,7 @@ gimp_color_area_update (GimpColorArea *gca)
for (x = 0; x < width; x++)
{
if (x * height < y * width)
if (x * height > y * width)
{
*p++ = opaque[0];
*p++ = opaque[1];
......@@ -353,7 +353,7 @@ gimp_color_area_update (GimpColorArea *gca)
continue;
}
frac = (gdouble) (x * height) / (gdouble) width - y;
frac = y - (gdouble) (x * height) / (gdouble) width;
if (((x / check_size) ^ (y / check_size)) & 1)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment