diff options
| author | lempamo <[email protected]> | 2017-09-19 18:23:31 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-09-19 18:23:31 -0400 |
| commit | 63015b606869522ab67cb7f549cbbd1187a8b654 (patch) | |
| tree | 8f95a5473aeecde13c793bd46df43fec20624be5 /Histacom2.Engine | |
| parent | 027924bedc822cb6a24e8feece692d3cd76e04d5 (diff) | |
| download | histacom2-63015b606869522ab67cb7f549cbbd1187a8b654.tar.gz histacom2-63015b606869522ab67cb7f549cbbd1187a8b654.tar.bz2 histacom2-63015b606869522ab67cb7f549cbbd1187a8b654.zip | |
minimum widths for windows
Diffstat (limited to 'Histacom2.Engine')
| -rw-r--r-- | Histacom2.Engine/Template/WinClassic.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Histacom2.Engine/Template/WinClassic.cs b/Histacom2.Engine/Template/WinClassic.cs index 0ccbe5b..c806d94 100644 --- a/Histacom2.Engine/Template/WinClassic.cs +++ b/Histacom2.Engine/Template/WinClassic.cs @@ -77,7 +77,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; resizer.ToDraw = toDraw; } } @@ -87,8 +87,10 @@ 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 (((this.Width + this.Location.X) - Cursor.Position.X) > progContent.MinimumSize.Width + 8) toDraw.X = Cursor.Position.X; + } resizer.ToDraw = toDraw; } } |
