aboutsummaryrefslogtreecommitdiff
path: root/Histacom2.Engine
diff options
context:
space:
mode:
authorAlex-TIMEHACK <[email protected]>2017-08-29 19:22:27 +0100
committerAlex-TIMEHACK <[email protected]>2017-08-29 19:22:27 +0100
commit213861a59ee7cb42816172c38994d93484d129e8 (patch)
tree3644ac63218378082e0afa90d4c42d73d6d3980c /Histacom2.Engine
parentcaeae8c96661da2fd69d8cb9a00dd2939d8e3063 (diff)
downloadhistacom2-213861a59ee7cb42816172c38994d93484d129e8.tar.gz
histacom2-213861a59ee7cb42816172c38994d93484d129e8.tar.bz2
histacom2-213861a59ee7cb42816172c38994d93484d129e8.zip
Fixed bottom and topright border resize
Diffstat (limited to 'Histacom2.Engine')
-rw-r--r--Histacom2.Engine/Template/WinClassic.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Histacom2.Engine/Template/WinClassic.cs b/Histacom2.Engine/Template/WinClassic.cs
index 3133798..23ea562 100644
--- a/Histacom2.Engine/Template/WinClassic.cs
+++ b/Histacom2.Engine/Template/WinClassic.cs
@@ -97,7 +97,7 @@ namespace Histacom2.Engine.Template
{
var toDraw = resizer.ToDraw;
if (resizable) toDraw.Y = this.Location.Y;
- if (resizable) toDraw.Height = ((toDraw.Height + toDraw.Top) + Cursor.Position.Y);
+ if (resizable) toDraw.Height = MousePosition.Y - this.Location.Y;
resizer.ToDraw = toDraw;
}
}
@@ -154,9 +154,8 @@ namespace Histacom2.Engine.Template
if (e.Button == MouseButtons.Left)
{
var toDraw = resizer.ToDraw;
- if (resizable) toDraw.Width = (Cursor.Position.X - toDraw.X);
+ if (resizable) toDraw.Width = MousePosition.X - this.Location.X;
if (resizable) toDraw.Height = ((toDraw.Height + toDraw.Top) - Cursor.Position.Y);
- if (resizable) toDraw.X = Cursor.Position.X;
if (resizable) toDraw.Y = Cursor.Position.Y;
resizer.ToDraw = toDraw;
}