Replace the name opacity for alpha

This commit is contained in:
Sam Gateau 2017-12-10 23:07:06 -08:00
parent eec4e966a7
commit bb888f2d4c
4 changed files with 20 additions and 20 deletions

View file

@ -410,19 +410,19 @@ bool SelectionHighlightStyle::fromVariantMap(const QVariantMap& properties) {
} }
} }
auto intensityVariant = properties["outlineUnoccludedOpacity"]; auto intensityVariant = properties["outlineUnoccludedAlpha"];
if (intensityVariant.isValid()) { if (intensityVariant.isValid()) {
_style._outlineUnoccluded.alpha = intensityVariant.toFloat(); _style._outlineUnoccluded.alpha = intensityVariant.toFloat();
} }
intensityVariant = properties["outlineOccludedOpacity"]; intensityVariant = properties["outlineOccludedAlpha"];
if (intensityVariant.isValid()) { if (intensityVariant.isValid()) {
_style._outlineOccluded.alpha = intensityVariant.toFloat(); _style._outlineOccluded.alpha = intensityVariant.toFloat();
} }
intensityVariant = properties["fillUnoccludedOpacity"]; intensityVariant = properties["fillUnoccludedAlpha"];
if (intensityVariant.isValid()) { if (intensityVariant.isValid()) {
_style._fillUnoccluded.alpha = intensityVariant.toFloat(); _style._fillUnoccluded.alpha = intensityVariant.toFloat();
} }
intensityVariant = properties["fillOccludedOpacity"]; intensityVariant = properties["fillOccludedAlpha"];
if (intensityVariant.isValid()) { if (intensityVariant.isValid()) {
_style._fillOccluded.alpha = intensityVariant.toFloat(); _style._fillOccluded.alpha = intensityVariant.toFloat();
} }
@ -447,10 +447,10 @@ QVariantMap SelectionHighlightStyle::toVariantMap() const {
properties["fillUnoccludedColor"] = xColorToVariant(xColorFromGlm(_style._fillUnoccluded.color)); properties["fillUnoccludedColor"] = xColorToVariant(xColorFromGlm(_style._fillUnoccluded.color));
properties["fillOccludedColor"] = xColorToVariant(xColorFromGlm(_style._fillOccluded.color)); properties["fillOccludedColor"] = xColorToVariant(xColorFromGlm(_style._fillOccluded.color));
properties["outlineUnoccludedOpacity"] = _style._outlineUnoccluded.alpha; properties["outlineUnoccludedAlpha"] = _style._outlineUnoccluded.alpha;
properties["outlineOccludedOpacity"] = _style._outlineOccluded.alpha; properties["outlineOccludedAlpha"] = _style._outlineOccluded.alpha;
properties["fillUnoccludedOpacity"] = _style._fillUnoccluded.alpha; properties["fillUnoccludedAlpha"] = _style._fillUnoccluded.alpha;
properties["fillOccludedOpacity"] = _style._fillOccluded.alpha; properties["fillOccludedAlpha"] = _style._fillOccluded.alpha;
properties["outlineWidth"] = _style._outlineWidth; properties["outlineWidth"] = _style._outlineWidth;
properties["isOutlineSmooth"] = _style._isOutlineSmooth; properties["isOutlineSmooth"] = _style._isOutlineSmooth;

View file

@ -185,10 +185,10 @@ public:
* - fillUnoccludedColor: {xColor} " * - fillUnoccludedColor: {xColor} "
* - fillOccludedColor: {xColor} " * - fillOccludedColor: {xColor} "
* *
* - outlineUnoccludedOpacity: {float} Opacity value ranging from 0.0 (not visible) to 1.0 (fully opaque) for the specified highlight region * - outlineUnoccludedAlpha: {float} Alpha value ranging from 0.0 (not visible) to 1.0 (fully opaque) for the specified highlight region
* - outlineOccludedOpacity: {float} " * - outlineOccludedAlpha: {float} "
* - fillUnoccludedOpacity: {float} " * - fillUnoccludedAlpha: {float} "
* - fillOccludedOpacity: {float} " * - fillOccludedAlpha: {float} "
* *
* - outlineWidth: {float} width of the outline expressed in pixels * - outlineWidth: {float} width of the outline expressed in pixels
* - isOutlineSmooth: {bool} true to enable oultine smooth falloff * - isOutlineSmooth: {bool} true to enable oultine smooth falloff

View file

@ -109,13 +109,13 @@
isOutlineSmooth: true, isOutlineSmooth: true,
outlineWidth: 5, outlineWidth: 5,
outlineUnoccludedColor: {red: 255, green: 128, blue: 128}, outlineUnoccludedColor: {red: 255, green: 128, blue: 128},
outlineUnoccludedIntensity: 0.88, outlineUnoccludedAlpha: 0.88,
outlineOccludedColor: {red: 255, green: 128, blue: 128}, outlineOccludedColor: {red: 255, green: 128, blue: 128},
outlineOccludedIntensity:0.5, outlineOccludedAlpha:0.5,
fillUnoccludedColor: {red: 26, green: 0, blue: 0}, fillUnoccludedColor: {red: 26, green: 0, blue: 0},
fillUnoccludedIntensity: 0.0, fillUnoccludedAlpha: 0.0,
fillOccludedColor: {red: 26, green: 0, blue: 0}, fillOccludedColor: {red: 26, green: 0, blue: 0},
fillOccludedIntensity: 0.0 fillOccludedAlpha: 0.0
} }
Selection.enableListHighlight(HoveringList, hoveringStyle) Selection.enableListHighlight(HoveringList, hoveringStyle)

View file

@ -64,10 +64,10 @@ Item {
Repeater { Repeater {
model: [ model: [
"Outline Unoccluded:outlineUnoccludedColor:outlineUnoccludedOpacity", "Outline Unoccluded:outlineUnoccludedColor:outlineUnoccludedAlpha",
"Outline Occluded:outlineOccludedColor:outlineOccludedOpacity", "Outline Occluded:outlineOccludedColor:outlineOccludedAlpha",
"Fill Unoccluded:fillUnoccludedColor:fillUnoccludedOpacity", "Fill Unoccluded:fillUnoccludedColor:fillUnoccludedAlpha",
"Fill Occluded:fillOccludedColor:fillOccludedOpacity"] "Fill Occluded:fillOccludedColor:fillOccludedAlpha"]
Column { Column {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right