Fill/Stroke dialog 'Opacity' shows selected gradient stop's alpha value

Bug #1028505 reported by John Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
In Progress
Undecided
John Smith

Bug Description

The Fill/Stroke dialog's Opacity slider shows a selected gradient stop's color alpha ("stop-opacity") value.
It should probably show the "master" opacity of the selected objects, so the stop opacity and object opacity can be controlled independently.

Tags: gradient ui
Revision history for this message
su_v (suv-lp) wrote :

See recent comments in bug #1028425 and Bug #169019: How do you propose to represent 'fill-opacity' and 'stroke-opacity' properties for objects which currently have a gradient as paint server?

Revision history for this message
su_v (suv-lp) wrote :

What about the 'Opacity' value in the status bar? Will it keep the old "incorrectness" and allow to quickly adjust the stop-opacity, or will it follow the proposed logic of 'Fill & Stroke' and set the object opacity, even if a gradient stop is selected?

Revision history for this message
su_v (suv-lp) wrote :

John Smith wrote:
> It should probably show the "master" opacity of the selected object - just as blur does.

Continuing from bug #1028425 here:
John Smith wrote:
> I think the Fill/Stroke "master" opacity should show the opacity of
> the selected object (line, rect etc), and the color alpha should show
> the opacity of the selected gradient stop in this case. Otherwise
> there is no way to independently control both the object opacity and
> the gradient stops opacity.

The problem as I understand it is that in SVG, there's a third level of opacity in-between, stored as independent property in the 'style' attribute, which is currently inaccessible (not represented in the GUI) in stable and trunk when using a paint server like gradient (or pattern): fill-opacity, stroke-opacity. These two values are represented in Inkscape for selected objects in the flat color chooser of fill / stroke as 'Alpha' values.
Neither of these two are (or could be) represented by the 'stop-opacity' for the gradient stop (stored in the gradient definition, not per object), or the global (aka object aka master) opacity. They may or may not be present in the style attribute of any object using a gradient. Inkscape takes them correctly into account when rendering the gradient -> this may result in unexpected differences between the rendered results and the gradient stop alpha values as shown in the GUI.

Even when making the 'Alpha' slider represent the 'stop-opacity' for selected gradient stops (bug #1028425), and - in the next step (bug #1028505) - unlinking the master opacity from the gradient's 'stop-opacity' and link it again to the object (aka master) opacity, inconsistencies remain because a basic attribute affecting the opacity of the gradient rendered on-canvas can't be accessed and changed via GUI (see attached sample file).

Maybe the opacity slider of a selected gradient stop should represent and edit the 'fill-opacity' (or 'stroke-opacity' respectively) of the parent property the gradient is applied to (fill, stroke), and only edit the object (aka master) opacity if no gradient stop is selected?

Revision history for this message
John Smith (john-smithi) wrote :

@suv, thanks for the detailed explanation on the svg opacity attributes.
So it seems with the current 2 opacity controls we cant have a "perfect" solution that covers all 3 svg opacity attributes for gradients.

Without adding any more UI that leaves at least 2 options for gradients

Gradient Option 1:
Opacity slider = svg object opacity
Alpha slider = svg stop-opacity

Gradient Option 2:
Opacity slider = svg object opacity when no stop selected, svg fill-opacity/stroke-opacity when stop selected
Alpha slider = svg stop-opacity

Option 2 covers all 3 attributes, but i wonder if it will be confusing to users ?

> What about the 'Opacity' value in the status bar?

a. Stop-opacity when stop selected, Object master opacity when no stop selected
b. Always Object master opacity

Both are valid - a. is convenient, b. is consistent ... I really dont mind.
Which do you prefer ?

Revision history for this message
John Smith (john-smithi) wrote :

Patch to have the F/S opacity slider show the "master opacity" of selected objects even when a gradient stop is selected. - this is consistent with when objects are selected. Stop opacity (alpha) and object "master" opacity can now be independently changed.
The opacity in the status bar is the same as the "master" opacity in F/S dialog.

There is still no way to change the fill-opacity or stroke-opacity in the F/S dialog.

John Smith (john-smithi)
Changed in inkscape:
assignee: nobody → John Smith (john-smithi)
status: New → In Progress
Revision history for this message
ScislaC (scislac) wrote :

John: What about adding a Fill Opacity/Stroke Opacity slider under the color controls, perhaps separated by a horizontal line to make it clear that alpha only controls the color's transparency. It would work well with the spinscale widget since you could fully write it out the name for the new slider.

Revision history for this message
John Smith (john-smithi) wrote :

@Scislac, do you mean inside the color picker below the alpha slider ?
That would increase the size of the color picker since i assume we would need to add it to all RGB/HSL/CMYK/Wheel and CMS ?

Or, do you mean outside of the color picker, but before the "master settings" (Blur and Opacity) ?

Revision history for this message
ScislaC (scislac) wrote :

Yes, I meant inside the color picker area. I'm just saying if we want to support easily editing that attribute, it seems like the most obvious place to put it imho.

Revision history for this message
John Smith (john-smithi) wrote :

Or, it could even go in the Gradients list. That is somewhat similar to ~suv's suggestion.
"When no stops are selected you are editing fill/stroke-opacity, but when a stop is selected you are editing stop-opacity"

Revision history for this message
John Smith (john-smithi) wrote : Re: Fill/Stroke dialog 'Opacity' is incorrectly showing a selected gradient stop's alpha value

Perhaps the discussion about fill-opacity, stroke-opacity should move to bug #169019.

If there are no issues with the patch (comment #5), i would like to commit this since it solves the issue specifically in this bug report.

summary: - Fill/Stroke Opacity is incorrectly showing a selected gradient stop's
- alpha value
+ Fill/Stroke dialog 'Opacity' is incorrectly showing a selected gradient
+ stop's alpha value
Revision history for this message
ScislaC (scislac) wrote :

Agreed. I should be able to test in a few hours.

Revision history for this message
su_v (suv-lp) wrote :

<off-topic opinion>
> Fill/Stroke dialog 'Opacity' is incorrectly showing a
> selected gradient stop's alpha value

Calling this "incorrectly" is dishonoring the work of earlier developers ;) - at the time, this was an intentional decision for an optimized workflow without over-complicating the interface.
<http://wiki.inkscape.org/wiki/index.php/Release_notes/0.46#Style_of_gradient_stops>
</off-topic opinion>

Revision history for this message
su_v (suv-lp) wrote :

Re <off-topic opinion> in previous comment - I'm sorry if my objections had been interrupting finding a solution for what others interpret as mistake. Please feel free to ignore my earlier comments - it often happens that I get kind of stuck in interpreting the technical spec (more SVG properties in this case than can be represented in the GUI) without being able to have a vision how this might map to a better user interface.

Revision history for this message
ScislaC (scislac) wrote :

Okay... the O: field in the status bar when gradient stops are selected, needs to function per-stop. Is it possible to dynamically change the label to A: if gradient stops are selected and then operate on the alpha attribute of the selection? Workflow-wise, it rocks not having to open the F&S dialog (I adjust stop transparency more via that widget than the dialog for the record).

Otherwise, I like the fix to the F&S dialog. The more fine-grained with features we get, having clarity in that dialog will be important.

John Smith (john-smithi)
summary: - Fill/Stroke dialog 'Opacity' is incorrectly showing a selected gradient
- stop's alpha value
+ Fill/Stroke dialog 'Opacity' shows selected gradient stop's alpha value
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.