Browse Source

Ensure Window MinHeight/Width is obeyed.

pull/8482/head
Dan Walmsley 4 years ago
parent
commit
d4ec5474d3
  1. 4
      src/Avalonia.Controls/Window.cs

4
src/Avalonia.Controls/Window.cs

@ -681,8 +681,8 @@ namespace Avalonia.Controls
IsVisible = true;
var initialSize = new Size(
double.IsNaN(Width) ? ClientSize.Width : Width,
double.IsNaN(Height) ? ClientSize.Height : Height);
double.IsNaN(Width) ? Math.Max(MinWidth, ClientSize.Width) : Width,
double.IsNaN(Height) ? Math.Max(MinHeight, ClientSize.Height) : Height);
if (initialSize != ClientSize)
{

Loading…
Cancel
Save