[WPF] Paned sizing improvements

Don't constraint the height of panels in horizontal layouts
(and width on vertical layouts)
This commit is contained in:
Lluis Sanchez 2013-10-28 15:06:01 +01:00
Родитель 7b100bfccc
Коммит f9c3f4c0c9
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -229,9 +229,9 @@ namespace Xwt.WPFBackend
h = s1.Height + s2.Height + SplitterSize;
w = Math.Max (s1.Width, s2.Width);
}
if (widthConstraint.IsConstrained && w > widthConstraint.AvailableSize)
if (direction == Orientation.Horizontal && widthConstraint.IsConstrained && w > widthConstraint.AvailableSize)
w = widthConstraint.AvailableSize;
if (heightConstraint.IsConstrained && h > heightConstraint.AvailableSize)
if (direction == Orientation.Vertical && heightConstraint.IsConstrained && h > heightConstraint.AvailableSize)
h = heightConstraint.AvailableSize;
return new Size (w, h);
}