Commit be3a1dcc authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

reduced the number of characters to show before ellipsizing the label.

2005-06-04  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdnd.c (gimp_dnd_get_viewable_icon): reduced the
	number of characters to show before ellipsizing the label.

	* libgimpwidgets/gimpcolorarea.c: added a "draw-border" property.

	* app/widgets/gimpcolorframe.c: draw a border around the color area.
parent 4da086d4
2005-06-04 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdnd.c (gimp_dnd_get_viewable_icon): reduced the
number of characters to show before ellipsizing the label.
* libgimpwidgets/gimpcolorarea.c: added a "draw-border" property.
* app/widgets/gimpcolorframe.c: draw a border around the color area.
2005-06-03 Michael Schumacher <schumaml@cvs.gnome.org>
* plug-ins/helpbrowser/dialog.c: added a O_BINARY to make sure
......
......@@ -163,12 +163,15 @@ gimp_color_frame_init (GimpColorFrame *frame)
gtk_misc_set_alignment (GTK_MISC (frame->number_label), 0.0, 0.5);
gtk_box_pack_start (GTK_BOX (hbox), frame->number_label, FALSE, FALSE, 0);
frame->color_area = gimp_color_area_new (&frame->color,
GIMP_COLOR_AREA_SMALL_CHECKS,
GDK_BUTTON1_MASK);
gtk_widget_set_size_request (frame->color_area, 30, 20);
gimp_color_area_set_color (GIMP_COLOR_AREA (frame->color_area),
&frame->color);
frame->color_area =
g_object_new (GIMP_TYPE_COLOR_AREA,
"color", &frame->color,
"type", GIMP_COLOR_AREA_SMALL_CHECKS,
"drag-mask", GDK_BUTTON1_MASK,
"draw-border", TRUE,
"height-request", 20,
NULL);
gtk_box_pack_end (GTK_BOX (hbox), frame->color_area, TRUE, TRUE, 0);
vbox2 = gtk_vbox_new (TRUE, 2);
......
......@@ -1729,7 +1729,7 @@ gimp_dnd_get_viewable_icon (GtkWidget *widget,
"xpad", 3,
"xalign", 0.0,
"yalign", 0.5,
"max-width-chars", 80,
"max-width-chars", 30,
"ellipsize", PANGO_ELLIPSIZE_END,
NULL);
......
......@@ -47,12 +47,13 @@ enum
PROP_0,
PROP_COLOR,
PROP_TYPE,
PROP_DRAG_MASK
PROP_DRAG_MASK,
PROP_DRAW_BORDER
};
static void gimp_color_area_class_init (GimpColorAreaClass *klass);
static void gimp_color_area_init (GimpColorArea *area);
static void gimp_color_area_class_init (GimpColorAreaClass *klass);
static void gimp_color_area_init (GimpColorArea *area);
static void gimp_color_area_get_property (GObject *object,
guint property_id,
......@@ -195,6 +196,18 @@ gimp_color_area_class_init (GimpColorAreaClass *klass)
0,
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY));
/**
* GimpColorArea:draw-border:
*
* Whether to draw a thin border in the foreground color around the area.
*
* Since: GIMP 2.4
*/
g_object_class_install_property (object_class, PROP_DRAW_BORDER,
g_param_spec_boolean ("draw-border",
NULL, NULL,
FALSE,
G_PARAM_READWRITE));
}
static void
......@@ -246,6 +259,10 @@ gimp_color_area_get_property (GObject *object,
g_value_set_enum (value, area->type);
break;
case PROP_DRAW_BORDER:
g_value_set_boolean (value, area->draw_border);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -282,6 +299,10 @@ gimp_color_area_set_property (GObject *object,
GDK_ACTION_COPY | GDK_ACTION_MOVE);
break;
case PROP_DRAW_BORDER:
gimp_color_area_set_draw_border (area, g_value_get_boolean (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -450,12 +471,15 @@ gimp_color_area_set_type (GimpColorArea *area,
{
g_return_if_fail (GIMP_IS_COLOR_AREA (area));
area->type = type;
if (area->type != type)
{
area->type = type;
area->needs_render = TRUE;
gtk_widget_queue_draw (GTK_WIDGET (area));
area->needs_render = TRUE;
gtk_widget_queue_draw (GTK_WIDGET (area));
g_object_notify (G_OBJECT (area), "type");
g_object_notify (G_OBJECT (area), "type");
}
}
/**
......@@ -473,9 +497,16 @@ gimp_color_area_set_draw_border (GimpColorArea *area,
{
g_return_if_fail (GIMP_IS_COLOR_AREA (area));
area->draw_border = draw_border ? TRUE : FALSE;
draw_border = draw_border ? TRUE : FALSE;
gtk_widget_queue_draw (GTK_WIDGET (area));
if (area->draw_border != draw_border)
{
area->draw_border = draw_border;
gtk_widget_queue_draw (GTK_WIDGET (area));
g_object_notify (G_OBJECT (area), "draw-border");
}
}
void
......
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