fixed #509 #422: Even if screen record region is small still buttons will show up properly

This commit is contained in:
Jaex 2015-02-13 09:18:51 +02:00
parent b3d9e7f445
commit 2d25429cef

View file

@ -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();