mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-12-25 17:59:24 +01:00
Fixed AutoInline elements overflowing into their parent if it's taller
This commit is contained in:
parent
94a54c336e
commit
db454ebd71
2 changed files with 6 additions and 3 deletions
|
@ -34,10 +34,11 @@ Removals
|
|||
|
||||
### MLEM.Ui
|
||||
Additions
|
||||
- Added `AutoInlineCenter` and `AutoInlineBottom` anchors
|
||||
- Added AutoInlineCenter and AutoInlineBottom anchors
|
||||
|
||||
Fixes
|
||||
- Fixed images not updating their hidden state properly when the displayed texture changes
|
||||
- Fixed AutoInline elements overflowing into their parent if it's taller
|
||||
|
||||
Improvements
|
||||
- Increased Element area calculation recursion limit to 64
|
||||
|
|
|
@ -728,9 +728,11 @@ namespace MLEM.Ui.Elements {
|
|||
pos.Y += anchorElArea.Height - newSize.Y;
|
||||
}
|
||||
} else {
|
||||
// all inline anchors act the same when overflowing into the next line
|
||||
pos.X = parentArea.X + this.ScaledOffset.X;
|
||||
pos.Y = anchorElArea.Bottom + this.ScaledOffset.Y;
|
||||
// inline anchors that overflow into the next line act like AutoLeft
|
||||
var newlineAnchorEl = this.GetLowestOlderSibling(e => !e.IsHidden && e.CanAutoAnchorsAttach);
|
||||
if (newlineAnchorEl != null)
|
||||
pos.Y = newlineAnchorEl.GetAreaForAutoAnchors().Bottom + this.ScaledOffset.Y;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue