From 41fe7e28aa10e7a1a213c7b57a77ff5fe09c85cf Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 27 Jan 2015 00:36:20 +0100 Subject: [PATCH] Hack dev tools to work again. Need to fix the root layout problem that hangs it though. --- Perspex.Controls/TopLevel.cs | 6 ++++++ Perspex.Diagnostics/DevTools.cs | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/Perspex.Controls/TopLevel.cs b/Perspex.Controls/TopLevel.cs index 45a5217bde..2a3b19f13e 100644 --- a/Perspex.Controls/TopLevel.cs +++ b/Perspex.Controls/TopLevel.cs @@ -146,6 +146,12 @@ namespace Perspex.Controls return Disposable.Create(() => this.autoSizing = false); } + protected override Size ArrangeOverride(Size finalSize) + { + this.PlatformImpl.ClientSize = finalSize; + return base.ArrangeOverride(finalSize); + } + protected void ExecuteLayoutPass() { this.LayoutManager.ExecuteLayoutPass(); diff --git a/Perspex.Diagnostics/DevTools.cs b/Perspex.Diagnostics/DevTools.cs index 837ec22c76..da0c4bd3be 100644 --- a/Perspex.Diagnostics/DevTools.cs +++ b/Perspex.Diagnostics/DevTools.cs @@ -118,6 +118,10 @@ namespace Perspex.Diagnostics { Window window = new Window { + // HACK: Set width and height here as a quick fix as there's a problem with + // the dev tools window hanging when it's set to auto-size. + Width = 800, + Height = 600, Content = new DevTools { Root = (Window)sender,