Only set opacity if needed
This commit is contained in:
parent
a4a940795e
commit
d7cdc88a3e
|
@ -149,7 +149,12 @@ namespace Ooui.Forms
|
||||||
else if (width <= 0 || height <= 0) {
|
else if (width <= 0 || height <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (opacity >= 1.0f) {
|
||||||
|
uiview.Style.Opacity = null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
uiview.Style.Opacity = opacity;
|
uiview.Style.Opacity = opacity;
|
||||||
|
}
|
||||||
|
|
||||||
//var transform = 0;
|
//var transform = 0;
|
||||||
//const double epsilon = 0.001;
|
//const double epsilon = 0.001;
|
||||||
|
|
|
@ -338,7 +338,8 @@ namespace Ooui
|
||||||
var safeValue = value ?? "inherit";
|
var safeValue = value ?? "inherit";
|
||||||
lock (properties) {
|
lock (properties) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
properties.Remove (propertyName);
|
if (!properties.Remove (propertyName))
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Value old;
|
Value old;
|
||||||
|
|
Loading…
Reference in New Issue