mirror of https://github.com/2dust/v2rayN
Remove the function of minimizing at startup, because it affects the startup position
parent
73ad33dfc9
commit
22475e459d
|
@ -194,10 +194,10 @@ namespace v2rayN.Views
|
||||||
|
|
||||||
spEnableTun.Visibility = IsAdministrator ? Visibility.Visible : Visibility.Collapsed;
|
spEnableTun.Visibility = IsAdministrator ? Visibility.Visible : Visibility.Collapsed;
|
||||||
|
|
||||||
if (_config.uiItem.autoHideStartup)
|
//if (_config.uiItem.autoHideStartup)
|
||||||
{
|
//{
|
||||||
WindowState = WindowState.Minimized;
|
// WindowState = WindowState.Minimized;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (!_config.guiItem.enableHWA)
|
if (!_config.guiItem.enableHWA)
|
||||||
{
|
{
|
||||||
|
@ -420,11 +420,11 @@ namespace v2rayN.Views
|
||||||
Height = _config.uiItem.mainHeight;
|
Height = _config.uiItem.mainHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntPtr hWnd = new WindowInteropHelper(this).EnsureHandle();
|
//IntPtr hWnd = new WindowInteropHelper(this).EnsureHandle();
|
||||||
Graphics g = Graphics.FromHwnd(hWnd);
|
//Graphics g = Graphics.FromHwnd(hWnd);
|
||||||
var dip = 96;
|
//var dip = 96;
|
||||||
var maxWidth = SystemParameters.WorkArea.Width * dip / g.DpiX;
|
var maxWidth = SystemParameters.WorkArea.Width;// * dip / g.DpiX;
|
||||||
var maxHeight = SystemParameters.WorkArea.Height * dip / g.DpiY;
|
var maxHeight = SystemParameters.WorkArea.Height;// * dip / g.DpiY;
|
||||||
if (Width > maxWidth) Width = maxWidth;
|
if (Width > maxWidth) Width = maxWidth;
|
||||||
if (Height > maxHeight) Height = maxHeight;
|
if (Height > maxHeight) Height = maxHeight;
|
||||||
if (_config.uiItem.mainGirdHeight1 > 0 && _config.uiItem.mainGirdHeight2 > 0)
|
if (_config.uiItem.mainGirdHeight1 > 0 && _config.uiItem.mainGirdHeight2 > 0)
|
||||||
|
|
Loading…
Reference in New Issue