After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 132204 - Have better indication when working on layer mask
Have better indication when working on layer mask
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
git master
Other Linux
: Normal enhancement
: Future
Assigned To: GIMP Bugs
GIMP Bugs
: 158134 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-01-22 15:40 UTC by Jakub Steiner
Modified: 2008-02-14 16:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to draw the layer boundary red when the layer mask is active (1.72 KB, patch)
2004-10-26 11:56 UTC, Simon Budig
needs-work Details | Review
reworking of Simon's patch (3.39 KB, patch)
2007-12-12 19:35 UTC, weskaggs
none Details | Review

Description Jakub Steiner 2004-01-22 15:40:16 UTC
It is hard to destinguish when I'm working on a layer and when on a mask.
It would be nice to have an extra indication in the UI when having the mask
selected. Possible options:

* having the cursor change - have it flip horizontally or invert color. Or
add an emblem (may be too much if using crosshair+tool

* havig the canvas padding color change - I like that most, but that's
because I work on icons and see the canvas usually.

* image greyed - Dave suggested this in bug #131163, but I'm not a big
friend of this. You want to see properly how the mask affects the layer.

* icon in the statusbar - currently the status bar prints 'layer mask' at
the bottom. If it was prefixed with an icon, it would help.
Comment 1 Jakub Steiner 2004-01-22 15:40:51 UTC
*** Bug 131163 has been marked as a duplicate of this bug. ***
Comment 2 Dave Neary 2004-01-22 16:10:07 UTC
I meant in the layers dialog - currently it can be tough to see
whether the image or the mask is active in that dock. If one or the
other is inactive, they could be greyed over a bit. This wouldn't
affect the projection. 

Dave.
Comment 3 Sven Neumann 2004-10-24 21:40:44 UTC
I don't think graying out the preview is a good idea. This can be very hard to
distinguish with some layers. Also there is already an indication in the layers
dialog. What this bug report is about is to add an indicator to the image area
where it is clearly visible even if the layers view is obscured.

Moving this enhancement request from the 2.2 milestone. It shouldn't block the
release.
Comment 4 Simon Budig 2004-10-26 11:51:41 UTC
Ok, another possibility would be to change the color of the layer boundary. It
is not always visible though. I'll attach a patch that does this (still needs
some work, it does not update properly since the boundary doesn't get redrawn
when switching between the layer mask and its layer).
Comment 5 Simon Budig 2004-10-26 11:56:33 UTC
Created attachment 33071 [details] [review]
Patch to draw the layer boundary red when the layer mask is active

Ok, probably an enum value should be introduced, reusing GUIDE_ACTIVE is eeky.
Also the updating has to be fixed. I can do this if this patch is considered
feasible.
Comment 6 Joao S. O. Bueno 2004-10-26 13:12:08 UTC
What about just thickening the current rectangle on the mask preview in the 
layers dialog? It is 1 px wide, ain't it? 2 or 3px would be much more visible. 
 
Also, possibly a tooltip on the layer / mask previews could be dinamically 
attached - that would not increase visibility while working, but would make 
the systrem a lot easier to understand fro newcommers. 
 
Comment 7 Sven Neumann 2004-10-26 13:34:02 UTC
Increasing the border-width would decrease the size of the layer and mask
previews. Not sure if that's a good idea.
Comment 8 Albert Cahalan 2004-11-13 04:21:52 UTC
Increasing the border size is good. Apple has a 2560x1600 display now.
Increasing the border size need not decrease the preview size; it could
increase the dialog box size instead. (and the preview could grow too)

Even at 5 pixels though, the meaning is still obscure. The layers dialog
really needs a status bar with a text description of what is being edited
and what is being seen. It could go along the bottom, and look like this:

You are seeing the image unaffected by the layer mask.
You are editing the layer mask.

(that's just 2 lines, which is very little space for something so important)
Comment 9 Sven Neumann 2004-11-13 13:03:22 UTC
OK, so now that Apple offers a high resolution display we can of course assume
that all our users will have one of these. Well, perhaps wait till X-Mas but
then we can safely assume that there's enough screen estate to waste on every
GIMP user's display.

Alan, if you want a larger preview, why don't you just increase the preview size
then? It's all configurable.
Comment 10 Jakub Steiner 2004-11-15 18:02:35 UTC
I don;t like increasing the padding for the thumbnail either, the layer dialog
is actually using way too much screen estate already.

What if we made the image canvas padding visible even for zooms above 100%.

Not only because it would be useful for changing padding color for when the mask
is active. More importantly perhaps, because it would be easier to do selections
that start at the edge of the image - you don't need to be pixel precise if
there is some canvas padding and you can start the selection there. 

On many ocassions this doesn't help much with this particular bug though, since
you'll be zoomed in in a central area that still doesn't show a single bit of
the padding at all.
Comment 11 Dave Neary 2004-11-15 18:17:23 UTC
I don't know how I missed the last few comments here... anyway.

I definitely think Simon's patch for the layers dialog should be applied. For
the actual canvas, the problem is a bit trickier, I like Jimmac's idea of having
a border around the image, inside the rules.

Comment 12 Sven Neumann 2004-11-15 18:46:34 UTC
I like Simon's patch as well but it would have to be cleaned up before it can be
applied. Wouldn't mind to accept it for 2.2 still.

Jimmac, your proposal about the padding around the image is handled in bug
#66417 already.
Comment 13 weskaggs 2005-02-25 18:41:41 UTC
*** Bug 158134 has been marked as a duplicate of this bug. ***
Comment 14 Albert Cahalan 2005-02-25 20:12:57 UTC
As noted in Bug 158134, the colored border ideas are:

1. not discoverable (goes against good GUI design)
2. not suitable for the colorblind (yes they can draw)

Better fix:

Add a status bar across the bottom of the dialog box to explain,
in words, what is going on. What am I seeing, what am I editing,
and so on.

As for the minimum canvas padding idea, that's a whole different
issue. (a very good idea, for making selections etc.)
Comment 15 weskaggs 2005-02-25 20:55:11 UTC
The status area of the image window already tells you what you are seeing and
working on.  Maybe adding "(MASK)" to the drawable name there would make it
catch the eye more, though.
Comment 16 Joao S. O. Bueno 2005-03-10 14:07:47 UTC
I just noted that #15 is already implemented 
Comment 17 weskaggs 2007-12-12 19:35:30 UTC
Created attachment 100846 [details] [review]
reworking of Simon's patch

The patch that Simon submitted has become completely stale.  I have updated it, and also added some code to cause the edges to get redrawn when a layer mask is activated.  It seems to work, but I'm not 100% sure that the implementation is theoretically correct.

The patch still uses GIMP_CANVAS_STYLE_GUIDE_ACTIVE, but that's trivial to change.  The important question is whether I am using the right signal, and handling it correctly.
Comment 18 Sven Neumann 2007-12-18 08:58:56 UTC
I think this looks fine, except for the abuse of the guide style. We should probably introduce an extra style for this. Perhaps a green (dashed) outline would look nice and it would be consistent with the color we use in the Layers dialog when only the mask is shown.
Comment 19 weskaggs 2008-01-03 21:59:44 UTC
Okay, I've created a new style as suggested, and committed to Trunk.  I think the green is actually pretty hard to see in a lot of cases, but this is trivial to change once the basic structure is in place.

2008-01-03  Bill Skaggs  <weskaggs@primate.udavis.edu>

	committing patch by Simon Budig to give an indication
	when working on a layer mask, updated to fix staleness
	and respond to "edit-changed".  Might fix bug #132204.
	
	* app/core/core-enums.[ch]: add GIMP_SELECTION_LAYER_ON.

	* app/core/gimplayermask.c: add handler for "edit-changed".

	* app/core/gimpcanvas.[ch]:  add new style
	GIMP_CANVAS_STYLE_LAYER_MASK_ACTIVE.

	* app/display/gimpdisplayshell-selection.c: use new style
	when layer mask is active.

I'll leave this bug report open for the moment.
Comment 20 weskaggs 2008-02-14 16:00:24 UTC
I'm going to go ahead and resolve this as FIXED -- this doesn't mean that no improvements are possible, but the bug report doesn't seem necessary any longer.