diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-09 15:37:09 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-09 15:37:09 +0100 |
| commit | 6ddcd449a085f7fa43d7f1176c47e62a3597c9ef (patch) | |
| tree | cdb2a6a689c468b28dc5b9a3cbde25077d94cc77 /src/Interface.cs | |
| parent | b4347f1bf30a103a85fff5b8517fcea99ee94273 (diff) | |
editor abstract base class, svgeditor base
Diffstat (limited to 'src/Interface.cs')
| -rw-r--r-- | src/Interface.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Interface.cs b/src/Interface.cs index a3bd9fd4..eb4caefa 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -1133,6 +1133,19 @@ namespace Crow ctxMenuContainer = Load ("#Crow.ContextMenu.template") as MenuItem; } + void CtxMenuContainer_LayoutChanged (object sender, LayoutingEventArgs e) + { + Rectangle r = ctxMenuContainer.ScreenCoordinates (ctxMenuContainer.Slot); + if (e.LayoutType == LayoutingType.Width) { + if (r.Right > this.clientRectangle.Right) + ctxMenuContainer.Left = this.clientRectangle.Right - ctxMenuContainer.Slot.Width; + }else if (e.LayoutType == LayoutingType.Width) { + if (r.Bottom > this.clientRectangle.Bottom) + ctxMenuContainer.Top = this.clientRectangle.Bottom - ctxMenuContainer.Slot.Height; + } + + } + public void ShowContextMenu (GraphicObject go) { lock (UpdateMutex) { |