mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
fix: panel width differs to size specified in xml
This commit is contained in:
parent
145a7b6273
commit
8cc51a107e
2 changed files with 4 additions and 5 deletions
|
|
@ -81,7 +81,9 @@ void Panel::refresh() {
|
|||
float ex = x + margin.x;
|
||||
node->setPos(glm::vec2(ex, y));
|
||||
|
||||
float width = size.x - padding.x - padding.z - margin.x - margin.z;
|
||||
int width = glm::floor(
|
||||
size.x - padding.x - padding.z - margin.x - margin.z
|
||||
);
|
||||
if (node->isResizing()) {
|
||||
node->setMaxSize({width, node->getMaxSize().y});
|
||||
node->setSize(glm::vec2(width, node->getSize().y));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue