[BUG] submenu wrong location (#97)

This commit is contained in:
Markus Hofknecht 2020-06-20 21:02:03 +02:00
parent 11f44f9f79
commit 1ffb169765
2 changed files with 3 additions and 4 deletions

View file

@ -668,8 +668,7 @@ namespace SystemTrayMenu.Business
menu.Padding.Horizontal + menuPredecessor.Width);
if (directionToRight)
{
if (widthPredecessors - menu.Width <=
-menu.Padding.Horizontal)
if (widthPredecessors - menus[0].Width - menu.Width < 0)
{
directionToRight = false;
}
@ -679,7 +678,7 @@ namespace SystemTrayMenu.Business
}
}
else if (Statics.ScreenWidth <
widthPredecessors + menuPredecessor.Width + menu.Width)
widthPredecessors + menus[0].Width + menu.Width)
{
directionToRight = true;
widthPredecessors -= newWith;

View file

@ -121,7 +121,7 @@ namespace SystemTrayMenu.Handler
rowData.MenuLevel = menu.Level;
if (!rowData.IsContextMenuOpen &&
rowData.ContainsMenu &&
rowData.MenuLevel < MenuDefines.MenusMax)
rowData.MenuLevel + 1 < MenuDefines.MenusMax)
{
StartLoadMenu.Invoke(rowData);
}