[WPF] Paned sizing improvements
Don't constraint the height of panels in horizontal layouts (and width on vertical layouts)
This commit is contained in:
Родитель
7b100bfccc
Коммит
f9c3f4c0c9
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче