aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/Interface.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-03-09 23:11:41 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-03-09 23:11:41 +0100
commit991a840bf9bc92ddc76e9e9961706168328a211b (patch)
tree3991792bcb4974137980bbf20c0472632b8d3032 /src/Interface.cs
parent6ddcd449a085f7fa43d7f1176c47e62a3597c9ef (diff)
undo/redo, hscrollbar
Diffstat (limited to 'src/Interface.cs')
-rw-r--r--src/Interface.cs5
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;
}