diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2020-04-21 15:39:37 +0200 |
|---|---|---|
| committer | j-p <jp_bruyere@hotmail.com> | 2020-05-10 00:50:02 +0200 |
| commit | e320afaf6485241c6cce5a4cbe367f17b85ba412 (patch) | |
| tree | 501de197846538a691b6bcfc9dfed8f0bd2a13b8 | |
| parent | e7ab497982ca228ea715652c9763bac604182ea6 (diff) | |
debug size inequality
| -rw-r--r-- | Crow/src/Size.cs | 4 | ||||
| -rw-r--r-- | Samples/common/ui/templates/enumGetIcons.itmp | 7 |
2 files changed, 9 insertions, 2 deletions
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 @@ +<Label Font="{./Font}" Text="{./Caption}" CornerRadius="{./CornerRadius}" + Margin="3" + Background="{./Background}" + Foreground="DimGrey" + TextAlignment="Center" + MouseEnter="{Foreground=White}" + MouseLeave="{Foreground=DimGrey}"/>
\ No newline at end of file |