From: Jean-Philippe Bruyère Date: Tue, 21 Apr 2020 13:39:37 +0000 (+0200) Subject: debug size inequality X-Git-Tag: v0.9.5-beta~125 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=e320afaf6485241c6cce5a4cbe367f17b85ba412;p=jp%2Fcrow.git debug size inequality --- diff --git a/Crow/src/Size.cs b/Crow/src/Size.cs index 18bc8b57..77347f06 100644 --- a/Crow/src/Size.cs +++ b/Crow/src/Size.cs @@ -30,7 +30,7 @@ namespace Crow public static implicit operator Size(string s)=> string.IsNullOrEmpty (s) ? Zero : Parse (s); public static bool operator == (Size s1, Size s2) => (s1.Width == s2.Width && s1.Height == s2.Height); - public static bool operator != (Size s1, Size s2) => (s1.Width == s2.Width && s1.Height == s2.Height); + public static bool operator != (Size s1, Size s2) => (s1.Width != s2.Width || s1.Height != s2.Height); public static bool operator > (Size s1, Size s2) => (s1.Width > s2.Width && s1.Height > s2.Height); public static bool operator >= (Size s1, Size s2) => (s1.Width >= s2.Width && s1.Height >= s2.Height); public static bool operator < (Size s1, Size s2) => (s1.Width < s2.Width) ? s1.Height <= s2.Height : @@ -41,7 +41,7 @@ namespace Crow public static bool operator >= (Size s, int i) => s.Width >= i && s.Height >= i; public static bool operator <= (Size s1, Size s2) => (s1.Width <= s2.Width && s1.Height <= s2.Height); public static bool operator == (Size s, int i) => (s.Width == i && s.Height == i); - public static bool operator != (Size s, int i) => (s.Width == i && s.Height == i); + public static bool operator != (Size s, int i) => (s.Width != i || s.Height != i); public static Size operator + (Size s1, Size s2) => new Size (s1.Width + s2.Width, s1.Height + s2.Height); public static Size operator + (Size s, int i) => new Size (s.Width + i, s.Height + i); public static Size operator * (Size s, int i) => new Size (s.Width * i, s.Height * i); diff --git a/Samples/common/ui/templates/enumGetIcons.itmp b/Samples/common/ui/templates/enumGetIcons.itmp new file mode 100644 index 00000000..048d495b --- /dev/null +++ b/Samples/common/ui/templates/enumGetIcons.itmp @@ -0,0 +1,7 @@ +