revert revert revert & re-enable init height

This commit is contained in:
YukkuriC 2023-09-23 20:46:24 +08:00 committed by ZouJin
parent aad55a5576
commit cdc63b63ac

View File

@ -99,7 +99,7 @@ namespace VPet_Simulator.Windows
//this.Height = 450 * ZoomSlider.Value;
InitializeComponent();
//this.Height = 500 * Set.ZoomLevel;
this.Height = 500 * Set.ZoomLevel;
this.Width = 500 * Set.ZoomLevel;
double L = 0, T = 0;
@ -118,17 +118,17 @@ namespace VPet_Simulator.Windows
L = point.X; T = point.Y;
}
//// control position inside bounds
Core.Controller = new MWController(this);
//double dist;
//if ((dist = Core.Controller.GetWindowsDistanceLeft()) < 0) L -= dist;
//if ((dist = Core.Controller.GetWindowsDistanceRight()) < 0) L += dist;
//if ((dist = Core.Controller.GetWindowsDistanceUp()) < 0) T -= dist;
//if ((dist = Core.Controller.GetWindowsDistanceDown()) < 0) T += dist;
Left = L;
Top = T;
// control position inside bounds
Core.Controller = new MWController(this);
double dist;
if ((dist = Core.Controller.GetWindowsDistanceLeft()) < 0) Left -= dist;
if ((dist = Core.Controller.GetWindowsDistanceRight()) < 0) Left += dist;
if ((dist = Core.Controller.GetWindowsDistanceUp()) < 0) Top -= dist;
if ((dist = Core.Controller.GetWindowsDistanceDown()) < 0) Top += dist;
if (Set.TopMost)
{
Topmost = true;