aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-09-19 18:59:11 -0400
committerlempamo <[email protected]>2017-09-19 18:59:11 -0400
commitcd16332b3c651b4190d91a9e00b8dff88c2db2da (patch)
tree87a759afb3d683a38e8b4cf2358ee9766ee935f3
parent63015b606869522ab67cb7f549cbbd1187a8b654 (diff)
downloadhistacom2-cd16332b3c651b4190d91a9e00b8dff88c2db2da.tar.gz
histacom2-cd16332b3c651b4190d91a9e00b8dff88c2db2da.tar.bz2
histacom2-cd16332b3c651b4190d91a9e00b8dff88c2db2da.zip
Fixed minimum width for corners
-rw-r--r--Histacom2.Engine/Template/WinClassic.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Histacom2.Engine/Template/WinClassic.cs b/Histacom2.Engine/Template/WinClassic.cs
index c806d94..25cbfaa 100644
--- a/Histacom2.Engine/Template/WinClassic.cs
+++ b/Histacom2.Engine/Template/WinClassic.cs
@@ -111,7 +111,7 @@ namespace Histacom2.Engine.Template
if (e.Button == MouseButtons.Left)
{
var toDraw = resizer.ToDraw;
- if (resizable) toDraw.Width = MousePosition.X - this.Location.X;
+ if (resizable) if (MousePosition.X - this.Location.X > progContent.MinimumSize.Width + 8) toDraw.Width = MousePosition.X - this.Location.X;
if (resizable) toDraw.Height = MousePosition.Y - this.Location.Y;
resizer.ToDraw = toDraw;
}
@@ -122,9 +122,9 @@ namespace Histacom2.Engine.Template
if (e.Button == MouseButtons.Left)
{
var toDraw = resizer.ToDraw;
- if (resizable) toDraw.Width = ((toDraw.Width + toDraw.Location.X) - Cursor.Position.X);
+ if (resizable) if (((this.Width + this.Location.X) - Cursor.Position.X) > progContent.MinimumSize.Width + 8) toDraw.Width = ((toDraw.Width + toDraw.Location.X) - Cursor.Position.X);
if (resizable) toDraw.Height = Cursor.Position.Y - this.Location.Y;
- if (resizable) toDraw.X = Cursor.Position.X;
+ if (resizable) if (((this.Width + this.Location.X) - Cursor.Position.X) > progContent.MinimumSize.Width + 8) toDraw.X = Cursor.Position.X;
resizer.ToDraw = toDraw;
}
}
@@ -134,8 +134,8 @@ namespace Histacom2.Engine.Template
if (e.Button == MouseButtons.Left)
{
var toDraw = resizer.ToDraw;
- if (resizable) toDraw.Width = ((this.Width + this.Location.X) - Cursor.Position.X);
- if (resizable) toDraw.X = Cursor.Position.X;
+ if (resizable) if (((this.Width + this.Location.X) - Cursor.Position.X) > progContent.MinimumSize.Width + 8) toDraw.Width = ((this.Width + this.Location.X) - Cursor.Position.X);
+ if (resizable) if (((this.Width + this.Location.X) - Cursor.Position.X) > progContent.MinimumSize.Width + 8) toDraw.X = Cursor.Position.X;
if (resizable) toDraw.Height = ((this.Height + this.Location.Y) - Cursor.Position.Y);
if (resizable) toDraw.Y = Cursor.Position.Y;
resizer.ToDraw = toDraw;
@@ -158,7 +158,7 @@ namespace Histacom2.Engine.Template
if (e.Button == MouseButtons.Left)
{
var toDraw = resizer.ToDraw;
- if (resizable) toDraw.Width = MousePosition.X - this.Location.X;
+ if (resizable) if (MousePosition.X - this.Location.X > progContent.MinimumSize.Width + 8) toDraw.Width = MousePosition.X - this.Location.X;
if (resizable) toDraw.Height = ((toDraw.Height + toDraw.Top) - Cursor.Position.Y);
if (resizable) toDraw.Y = Cursor.Position.Y;
resizer.ToDraw = toDraw;