Browse Source

add implementation for osx.

pull/3009/head
Dan Walmsley 7 years ago
parent
commit
54dd8a4002
  1. 6
      src/Avalonia.Native/WindowImplBase.cs

6
src/Avalonia.Native/WindowImplBase.cs

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Avalonia.Controls;
using Avalonia.Controls.Platform.Surfaces;
using Avalonia.Input;
@ -48,6 +49,11 @@ namespace Avalonia.Native
Screen = new ScreenImpl(screens);
_savedLogicalSize = ClientSize;
_savedScaling = Scaling;
var monitor = Screen.AllScreens.OrderBy(x => x.PixelDensity)
.FirstOrDefault(m => m.Bounds.Contains(Position));
Resize(new Size(monitor.WorkingArea.Width * 0.75d, monitor.WorkingArea.Height * 0.7d);
}
public Size ClientSize

Loading…
Cancel
Save