Skip to content

Commit

Permalink
修复高度bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kwwwvagaa committed Apr 8, 2021
1 parent a7af310 commit 19d1872
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions HZH_Controls/HZH_Controls/Controls/Menu/UCMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private void ReloadItems()
parentItem.SetStyle(m_parentItemStyles);
parentItem.SelectedItem += parentItem_SelectedItem;
Control c = parentItem as Control;
if (itemHeight <= 0)
if (itemHeight > 0)
c.Height = itemHeight;
c.Dock = DockStyle.Top;
if (parent.Childrens.Count <= 0)
Expand Down Expand Up @@ -329,7 +329,7 @@ private void SetChildrenControl(IMenuItem menuitem, bool blnChildren = true)
parentItem.SetStyle(m_childrenItemStyles);
parentItem.SelectedItem += parentItem_SelectedItem;
Control c = parentItem as Control;
if (itemHeight <= 0)
if (itemHeight > 0)
c.Height = itemHeight;
if (intItemHeigth == 0)
intItemHeigth = c.Height;
Expand Down Expand Up @@ -366,7 +366,7 @@ private void SetChildrenControl(IMenuItem menuitem, bool blnChildren = true)
parentItem.SetStyle(m_childrenItemStyles);
parentItem.SelectedItem += parentItem_SelectedItem;
Control c = parentItem as Control;
if (itemHeight <= 0)
if (itemHeight > 0)
c.Height = itemHeight;
if (intItemHeigth == 0)
intItemHeigth = c.Height;
Expand Down

0 comments on commit 19d1872

Please sign in to comment.