mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
format Container.cpp and Panel.cpp
This commit is contained in:
parent
863cc923a0
commit
660bd0a5d3
2 changed files with 58 additions and 39 deletions
|
|
@ -41,10 +41,14 @@ glm::vec2 Panel::getContentSize() const {
|
|||
void Panel::cropToContent() {
|
||||
if (maxLength > 0.0f) {
|
||||
setSize(glm::vec2(
|
||||
glm::max(minLength, glm::min(maxLength, actualLengthX)), glm::max(minLength, glm::min(maxLength, actualLengthY))
|
||||
glm::max(minLength, glm::min(maxLength, actualLengthX)),
|
||||
glm::max(minLength, glm::min(maxLength, actualLengthY))
|
||||
));
|
||||
} else {
|
||||
setSize(glm::vec2(glm::max(minLength, actualLengthX), glm::max(minLength, actualLengthY)));
|
||||
setSize(glm::vec2(
|
||||
glm::max(minLength, actualLengthX),
|
||||
glm::max(minLength, actualLengthY)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue