diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-09 23:11:41 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-09 23:11:41 +0100 |
| commit | fd3397cdf340284c7cbb912b45ebfdbb654947d5 (patch) | |
| tree | d4fe0c15d8e6b5c151ad0e76d58d3acd015b645c /src/Interface.cs | |
| parent | 2e540d7dd228ca86c064180198d75c6b21966550 (diff) | |
undo/redo, hscrollbar
Diffstat (limited to 'src/Interface.cs')
| -rw-r--r-- | src/Interface.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Interface.cs b/src/Interface.cs index eb4caefa..f17ac895 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -1131,15 +1131,16 @@ namespace Crow MenuItem ctxMenuContainer; protected void initContextMenus (){ ctxMenuContainer = Load ("#Crow.ContextMenu.template") as MenuItem; + ctxMenuContainer.LayoutChanged += CtxMenuContainer_LayoutChanged; } void CtxMenuContainer_LayoutChanged (object sender, LayoutingEventArgs e) { Rectangle r = ctxMenuContainer.ScreenCoordinates (ctxMenuContainer.Slot); - if (e.LayoutType == LayoutingType.Width) { + if (e.LayoutType == LayoutingType.Width || e.LayoutType == LayoutingType.X) { if (r.Right > this.clientRectangle.Right) ctxMenuContainer.Left = this.clientRectangle.Right - ctxMenuContainer.Slot.Width; - }else if (e.LayoutType == LayoutingType.Width) { + }else if (e.LayoutType == LayoutingType.Width || e.LayoutType == LayoutingType.Y) { if (r.Bottom > this.clientRectangle.Bottom) ctxMenuContainer.Top = this.clientRectangle.Bottom - ctxMenuContainer.Slot.Height; } |