Browse Source

Fix dev tools hack.

This fixes the problem hacked around in
41fe7e28aa. In the end the problem wasn't
ScrollViewer, it was that the correct size wasn't being passed to
Window.Arrange.
pull/39/head
Steven Kirk 11 years ago
parent
commit
2084edafb4
  1. 6
      Perspex.Diagnostics/DevTools.cs
  2. 4
      Perspex.Layout/LayoutManager.cs

6
Perspex.Diagnostics/DevTools.cs

@ -118,10 +118,8 @@ namespace Perspex.Diagnostics
{ {
Window window = new Window Window window = new Window
{ {
// HACK: Set width and height here as a quick fix as there's a problem with Width = 1024,
// the dev tools window hanging when it's set to auto-size. Height = 512,
Width = 800,
Height = 600,
Content = new DevTools Content = new DevTools
{ {
Root = (Window)sender, Root = (Window)sender,

4
Perspex.Layout/LayoutManager.cs

@ -206,9 +206,9 @@ namespace Perspex.Layout
this.toArrange = new Heap<Item>(HeapType.Minimum); this.toArrange = new Heap<Item>(HeapType.Minimum);
if (!this.Root.IsArrangeValid) if (!this.Root.IsArrangeValid && this.Root.IsMeasureValid)
{ {
this.Root.Arrange(new Rect(this.Root.ClientSize)); this.Root.Arrange(new Rect(this.Root.DesiredSize.Value));
} }
if (this.toMeasure.Count > 0) if (this.toMeasure.Count > 0)

Loading…
Cancel
Save