Commit 27d036b7 authored by Michael Natterer's avatar Michael Natterer 😴

Render a layer group's boundary in a different color

This is probably not sufficient, but better than nothing.
parent e6235cd9
......@@ -388,6 +388,7 @@ gimp_canvas_gc_new (GimpCanvas *canvas,
case GIMP_CANVAS_STYLE_SELECTION_IN:
case GIMP_CANVAS_STYLE_SELECTION_OUT:
case GIMP_CANVAS_STYLE_LAYER_BOUNDARY:
case GIMP_CANVAS_STYLE_LAYER_GROUP_BOUNDARY:
case GIMP_CANVAS_STYLE_GUIDE_NORMAL:
case GIMP_CANVAS_STYLE_GUIDE_ACTIVE:
case GIMP_CANVAS_STYLE_LAYER_MASK_ACTIVE:
......@@ -458,6 +459,16 @@ gimp_canvas_gc_new (GimpCanvas *canvas,
bg.blue = 0x0;
break;
case GIMP_CANVAS_STYLE_LAYER_GROUP_BOUNDARY:
fg.red = 0x0;
fg.green = 0x0;
fg.blue = 0x0;
bg.red = 0x0;
bg.green = 0xffff;
bg.blue = 0xffff;
break;
case GIMP_CANVAS_STYLE_GUIDE_NORMAL:
fg.red = 0x0;
fg.green = 0x0;
......
......@@ -30,6 +30,7 @@ typedef enum
GIMP_CANVAS_STYLE_SELECTION_IN,
GIMP_CANVAS_STYLE_SELECTION_OUT,
GIMP_CANVAS_STYLE_LAYER_BOUNDARY,
GIMP_CANVAS_STYLE_LAYER_GROUP_BOUNDARY,
GIMP_CANVAS_STYLE_GUIDE_NORMAL,
GIMP_CANVAS_STYLE_GUIDE_ACTIVE,
GIMP_CANVAS_STYLE_SAMPLE_POINT_NORMAL,
......
......@@ -382,11 +382,20 @@ selection_layer_draw (Selection *selection)
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
if (selection->segs_layer)
gimp_canvas_draw_segments (canvas, GIMP_IS_LAYER_MASK (drawable) ?
GIMP_CANVAS_STYLE_LAYER_MASK_ACTIVE:
GIMP_CANVAS_STYLE_LAYER_BOUNDARY,
selection->segs_layer,
selection->num_segs_layer);
{
GimpCanvasStyle style;
if (GIMP_IS_LAYER_MASK (drawable))
style = GIMP_CANVAS_STYLE_LAYER_MASK_ACTIVE;
else if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
style = GIMP_CANVAS_STYLE_LAYER_GROUP_BOUNDARY;
else
style = GIMP_CANVAS_STYLE_LAYER_BOUNDARY;
gimp_canvas_draw_segments (canvas, style,
selection->segs_layer,
selection->num_segs_layer);
}
}
static 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