mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-12-25 01:39:23 +01:00
small element fixes
This commit is contained in:
parent
fac7f2beb0
commit
05f148514f
1 changed files with 2 additions and 2 deletions
|
@ -309,7 +309,7 @@ namespace MLEM.Ui.Elements {
|
|||
foreach (var child in this.Children)
|
||||
child.ForceUpdateArea();
|
||||
|
||||
if (this.SetHeightBasedOnChildren) {
|
||||
if (this.SetHeightBasedOnChildren && this.Children.Count > 0) {
|
||||
var height = 0;
|
||||
foreach (var child in this.Children) {
|
||||
if (!child.isHidden && (child.Anchor <= Anchor.TopRight || child.Anchor >= Anchor.AutoLeft) && child.area.Bottom > height)
|
||||
|
@ -331,7 +331,7 @@ namespace MLEM.Ui.Elements {
|
|||
(this.size.Y > 1 ? this.ScaledSize.Y : parentArea.Height * this.size.Y).Floor());
|
||||
}
|
||||
|
||||
protected Rectangle GetAreaForAutoAnchors() {
|
||||
protected virtual Rectangle GetAreaForAutoAnchors() {
|
||||
return this.Area;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue