Add public PredefinedLayouts

This commit is contained in:
Yoshi Askharoun
2024-02-18 22:23:59 -06:00
parent 3bd3531f44
commit 2e5eaedcdc
16 changed files with 191 additions and 32 deletions
@@ -72,5 +72,16 @@ namespace Microsoft.Iris.ViewItems
}
void ILayout.Arrange(ILayoutNode layoutNode, LayoutSlot slot) => DefaultLayout.Arrange(layoutNode, slot);
public bool Equals(ILayout other)
{
if (other is not ImageLayout o) return false;
return DefaultChildAlignment == o.DefaultChildAlignment
&& SourceSize == o.SourceSize
&& MinimumSize == o.MinimumSize
&& MaintainAspectRatio == o.MaintainAspectRatio
&& Fill == o.Fill;
}
}
}
+5
View File
@@ -1430,6 +1430,11 @@ namespace Microsoft.Iris.ViewItems
text._bits = (uint)((Bits)text._bits & ~changeBit);
}
public bool Equals(ILayout other)
{
return this == other;
}
private class MarkedRange
{
public string tagName;
@@ -115,5 +115,14 @@ namespace Microsoft.Iris.ViewItems
}
void ILayout.Arrange(ILayoutNode layoutNode, LayoutSlot slot) => DefaultLayout.Arrange(layoutNode, slot);
public bool Equals(ILayout other)
{
if (other is not TextRunRenderer o) return false;
return DefaultChildAlignment == o.DefaultChildAlignment
&& Color == o.Color
&& Data.ToString() == o.Data.ToString();
}
}
}