diff options
| author | lempamo <[email protected]> | 2017-09-19 18:59:11 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-09-19 18:59:11 -0400 |
| commit | cd16332b3c651b4190d91a9e00b8dff88c2db2da (patch) | |
| tree | 87a759afb3d683a38e8b4cf2358ee9766ee935f3 /Histacom2.Engine | |
| parent | 63015b606869522ab67cb7f549cbbd1187a8b654 (diff) | |
| download | histacom2-cd16332b3c651b4190d91a9e00b8dff88c2db2da.tar.gz histacom2-cd16332b3c651b4190d91a9e00b8dff88c2db2da.tar.bz2 histacom2-cd16332b3c651b4190d91a9e00b8dff88c2db2da.zip | |
Fixed minimum width for corners
Diffstat (limited to 'Histacom2.Engine')
| -rw-r--r-- | Histacom2.Engine/Template/WinClassic.cs | 12 |
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; |
