mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 09:02:01 -05:00
Fixed bottom and topright border resize
This commit is contained in:
parent
caeae8c966
commit
213861a59e
1 changed files with 2 additions and 3 deletions
|
@ -97,7 +97,7 @@ private void bottom_MouseMove(object sender, MouseEventArgs e)
|
|||
{
|
||||
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 @@ private void toprightcorner_MouseMove(object sender, MouseEventArgs e)
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue