mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-05 20:54:31 +13:00
This commit is contained in:
parent
b3d9e7f445
commit
2d25429cef
1 changed files with 11 additions and 3 deletions
|
@ -56,12 +56,20 @@ public ScreenRegionForm(Rectangle regionRectangle)
|
|||
borderRectangle0Based = new Rectangle(0, 0, borderRectangle.Width, borderRectangle.Height);
|
||||
|
||||
Location = borderRectangle.Location;
|
||||
Size = new Size(borderRectangle.Width, borderRectangle.Height + pInfo.Height);
|
||||
pInfo.Location = new Point(Width - pInfo.Width, Height - pInfo.Height);
|
||||
int windowWidth = Math.Max(borderRectangle.Width, pInfo.Width);
|
||||
Size = new Size(windowWidth, borderRectangle.Height + pInfo.Height);
|
||||
pInfo.Location = new Point(0, borderRectangle.Height);
|
||||
|
||||
Region region = new Region(ClientRectangle);
|
||||
region.Exclude(borderRectangle0Based.Offset(-1));
|
||||
region.Exclude(new Rectangle(0, pInfo.Location.Y, pInfo.Location.X, pInfo.Height));
|
||||
if (borderRectangle.Width < pInfo.Width)
|
||||
{
|
||||
region.Exclude(new Rectangle(borderRectangle.Width, 0, pInfo.Width - borderRectangle.Width, borderRectangle.Height));
|
||||
}
|
||||
else
|
||||
{
|
||||
region.Exclude(new Rectangle(pInfo.Width, borderRectangle.Height, borderRectangle.Width - pInfo.Width, pInfo.Height));
|
||||
}
|
||||
Region = region;
|
||||
|
||||
Timer = new Stopwatch();
|
||||
|
|
Loading…
Reference in a new issue