1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-05-28 19:13:38 +02:00

fixed android screen sizes being incorrect

This commit is contained in:
Ellpeck 2020-04-19 14:04:44 +02:00
parent 9db6a52999
commit c16c2ef693

View file

@ -72,11 +72,11 @@ namespace MLEM.Ui {
this.GraphicsDevice = device;
this.Window = window;
this.style = style;
this.Viewport = device.Viewport.Bounds;
this.Viewport = new Rectangle(Point.Zero, window.ClientBounds.Size);
this.AutoScaleReferenceSize = this.Viewport.Size;
window.ClientSizeChanged += (sender, args) => {
this.Viewport = device.Viewport.Bounds;
this.Viewport = new Rectangle(Point.Zero, window.ClientBounds.Size);
foreach (var root in this.rootElements)
root.Element.ForceUpdateArea();
};