1
This commit is contained in:
@@ -133,22 +133,14 @@ namespace BITKit
|
||||
};
|
||||
if (fieldInfo is not null && Attribute.IsDefined(fieldInfo, typeof(ReadOnlyAttribute), true))
|
||||
{
|
||||
var attribute = fieldInfo.GetCustomAttribute<ReadOnlyAttribute>();
|
||||
field.pickingMode = PickingMode.Ignore;
|
||||
field.SetEnabled(false);
|
||||
field.style.opacity = 1;
|
||||
var x = field.Q("unity-text-input");
|
||||
var clearColor = new Color(0, 0, 0, 0);
|
||||
if (x is not null)
|
||||
field.AddToClassList("readonly");
|
||||
if (attribute.HideLabel)
|
||||
{
|
||||
x.style.backgroundColor = clearColor;
|
||||
x.style.borderTopColor = clearColor;
|
||||
x.style.borderBottomColor = clearColor;
|
||||
x.style.borderLeftColor = clearColor;
|
||||
x.style.borderRightColor = clearColor;
|
||||
foreach (var visualElement in field.Children())
|
||||
{
|
||||
visualElement.pickingMode = PickingMode.Ignore;
|
||||
}
|
||||
field.AddToClassList("hide-label");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user