1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 20:58:34 +01: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.GraphicsDevice = device;
this.Window = window; this.Window = window;
this.style = style; this.style = style;
this.Viewport = device.Viewport.Bounds; this.Viewport = new Rectangle(Point.Zero, window.ClientBounds.Size);
this.AutoScaleReferenceSize = this.Viewport.Size; this.AutoScaleReferenceSize = this.Viewport.Size;
window.ClientSizeChanged += (sender, args) => { window.ClientSizeChanged += (sender, args) => {
this.Viewport = device.Viewport.Bounds; this.Viewport = new Rectangle(Point.Zero, window.ClientBounds.Size);
foreach (var root in this.rootElements) foreach (var root in this.rootElements)
root.Element.ForceUpdateArea(); root.Element.ForceUpdateArea();
}; };