Commit b2465d29 authored by William Skaggs's avatar William Skaggs

Bill Skaggs <weskaggs@primate.ucdavis.edu>

	* app/widgets/gimpcolorframe.[ch]: add a color area, to make
	sample points dialog show a swatch of color for each point.
parent 41b549a7
2005-06-01 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/widgets/gimpcolorframe.[ch]: add a color area, to make
sample points dialog show a swatch of color for each point.
2005-06-01 Simon Budig <simon@gimp.org>
* app/vectors/gimpvectors.c: cosmetic change: Make the stroke IDs
......
......@@ -83,7 +83,9 @@ static void
gimp_color_frame_init (GimpColorFrame *frame)
{
GtkWidget *vbox;
GtkWidget *color_area;
gint i;
GimpRGB init_color = {0, 0, 0, 1};
frame->sample_valid = FALSE;
frame->sample_type = GIMP_RGB_IMAGE;
......@@ -102,6 +104,14 @@ gimp_color_frame_init (GimpColorFrame *frame)
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
color_area = gimp_color_area_new (&frame->color,
GIMP_COLOR_AREA_SMALL_CHECKS, 0);
gtk_widget_set_size_request (color_area, 30, 20);
gimp_color_area_set_color (GIMP_COLOR_AREA (color_area), &init_color);
gtk_box_pack_start (GTK_BOX (vbox), color_area, FALSE, FALSE, 0);
gtk_widget_show (color_area);
frame->color_area = color_area;
for (i = 0; i < GIMP_COLOR_FRAME_ROWS; i++)
{
GtkWidget *hbox;
......@@ -245,6 +255,9 @@ gimp_color_frame_update (GimpColorFrame *frame)
gimp_rgba_get_uchar (&frame->color, &r, &g, &b, &a);
gimp_color_area_set_color (GIMP_COLOR_AREA (frame->color_area),
&frame->color);
switch (frame->frame_mode)
{
case GIMP_COLOR_FRAME_MODE_PIXEL:
......
......@@ -50,6 +50,7 @@ struct _GimpColorFrame
GtkWidget *menu;
GtkWidget *name_labels[GIMP_COLOR_FRAME_ROWS];
GtkWidget *value_labels[GIMP_COLOR_FRAME_ROWS];
GtkWidget *color_area;
};
struct _GimpColorFrameClass
......
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