diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-06 08:01:25 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-06 08:01:25 +0100 |
| commit | 6577bc6e136c7440117bd7bb49cb4a4fd3fbcfa3 (patch) | |
| tree | cf104fa3c2430f286848133cf1c20d7b34382581 /src/GraphicObjects/Popper.cs | |
| parent | 643d44f381962d6814d3676cee322c41018406eb (diff) | |
use LayoutingType Enum everywhere instead of casting to (int)
Diffstat (limited to 'src/GraphicObjects/Popper.cs')
| -rw-r--r-- | src/GraphicObjects/Popper.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GraphicObjects/Popper.cs b/src/GraphicObjects/Popper.cs index a7e1290c..d213fd6d 100644 --- a/src/GraphicObjects/Popper.cs +++ b/src/GraphicObjects/Popper.cs @@ -66,7 +66,7 @@ namespace Crow if (tc == null) return; Rectangle r = this.ScreenCoordinates (this.Slot); - if (((int)e.LayoutType & (int)LayoutingType.Width) > 0) { + if (e.LayoutType.HasFlag(LayoutingType.Width)) { if (Content.Slot.Width < tc.ClientRectangle.Width) { if (r.Left + Content.Slot.Width > tc.ClientRectangle.Right) Content.Left = tc.ClientRectangle.Right - Content.Slot.Width; @@ -75,7 +75,7 @@ namespace Crow } else Content.Left = 0; } - if (((int)e.LayoutType & (int)LayoutingType.Height) > 0) { + if (e.LayoutType.HasFlag(LayoutingType.Height)) { if (Content.Slot.Height < tc.ClientRectangle.Height) { if (r.Bottom + Content.Slot.Height > tc.ClientRectangle.Bottom) Content.Top = r.Top - Content.Slot.Height; |