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) {
|
||||
return;
|
||||
}
|
||||
uiview.Style.Opacity = opacity;
|
||||
if (opacity >= 1.0f) {
|
||||
uiview.Style.Opacity = null;
|
||||
}
|
||||
else {
|
||||
uiview.Style.Opacity = opacity;
|
||||
}
|
||||
|
||||
//var transform = 0;
|
||||
//const double epsilon = 0.001;
|
||||
|
|
|
@ -338,7 +338,8 @@ namespace Ooui
|
|||
var safeValue = value ?? "inherit";
|
||||
lock (properties) {
|
||||
if (value == null) {
|
||||
properties.Remove (propertyName);
|
||||
if (!properties.Remove (propertyName))
|
||||
return;
|
||||
}
|
||||
else {
|
||||
Value old;
|
||||
|
|
Loading…
Reference in New Issue