mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-06-30 03:51:14 +12:00
[BUG] submenu wrong location (#97)
This commit is contained in:
parent
11f44f9f79
commit
1ffb169765
|
@ -668,8 +668,7 @@ namespace SystemTrayMenu.Business
|
||||||
menu.Padding.Horizontal + menuPredecessor.Width);
|
menu.Padding.Horizontal + menuPredecessor.Width);
|
||||||
if (directionToRight)
|
if (directionToRight)
|
||||||
{
|
{
|
||||||
if (widthPredecessors - menu.Width <=
|
if (widthPredecessors - menus[0].Width - menu.Width < 0)
|
||||||
-menu.Padding.Horizontal)
|
|
||||||
{
|
{
|
||||||
directionToRight = false;
|
directionToRight = false;
|
||||||
}
|
}
|
||||||
|
@ -679,7 +678,7 @@ namespace SystemTrayMenu.Business
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Statics.ScreenWidth <
|
else if (Statics.ScreenWidth <
|
||||||
widthPredecessors + menuPredecessor.Width + menu.Width)
|
widthPredecessors + menus[0].Width + menu.Width)
|
||||||
{
|
{
|
||||||
directionToRight = true;
|
directionToRight = true;
|
||||||
widthPredecessors -= newWith;
|
widthPredecessors -= newWith;
|
||||||
|
|
|
@ -121,7 +121,7 @@ namespace SystemTrayMenu.Handler
|
||||||
rowData.MenuLevel = menu.Level;
|
rowData.MenuLevel = menu.Level;
|
||||||
if (!rowData.IsContextMenuOpen &&
|
if (!rowData.IsContextMenuOpen &&
|
||||||
rowData.ContainsMenu &&
|
rowData.ContainsMenu &&
|
||||||
rowData.MenuLevel < MenuDefines.MenusMax)
|
rowData.MenuLevel + 1 < MenuDefines.MenusMax)
|
||||||
{
|
{
|
||||||
StartLoadMenu.Invoke(rowData);
|
StartLoadMenu.Invoke(rowData);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue