mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-29 17:02:05 +13:00
fixed #7086: Auto hide toolbar if toolbar is bigger than form
This commit is contained in:
parent
2f07fba591
commit
84dacf3d75
1 changed files with 4 additions and 3 deletions
|
@ -214,9 +214,8 @@ protected override void Dispose(bool disposing)
|
||||||
|
|
||||||
private void UpdateControls()
|
private void UpdateControls()
|
||||||
{
|
{
|
||||||
bool isCursorInside = ClientRectangle.Contains(PointToClient(MousePosition));
|
tsMain.Visible = ClientRectangle.Contains(PointToClient(MousePosition)) &&
|
||||||
|
ClientRectangle.Contains(tsMain.Bounds.SizeOffset(tsMain.Location.X, tsMain.Location.Y));
|
||||||
tsMain.Visible = isCursorInside;
|
|
||||||
tslScale.Text = ImageScale + "%";
|
tslScale.Text = ImageScale + "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,6 +264,8 @@ private void AutoSizeForm()
|
||||||
|
|
||||||
NativeMethods.SetWindowPos(Handle, insertAfter, newLocation.X, newLocation.Y, newSize.Width, newSize.Height, flags);
|
NativeMethods.SetWindowPos(Handle, insertAfter, newLocation.X, newLocation.Y, newSize.Width, newSize.Height, flags);
|
||||||
|
|
||||||
|
UpdateControls();
|
||||||
|
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue