mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
ui/pad: fix calculating right and bottom margins
This commit is contained in:
parent
c239b1124d
commit
009c0b003c
1 changed files with 3 additions and 3 deletions
|
@ -33,11 +33,11 @@ static void M_Layout(
|
|||
{
|
||||
UI_LayoutBasic(node, x, y, w, h);
|
||||
const M_DATA *const data = node->data;
|
||||
const float px = data->l;
|
||||
const float py = data->t;
|
||||
UI_NODE *child = node->first_child;
|
||||
while (child != nullptr) {
|
||||
child->ops->layout(child, x + px, y + py, w - px * 2.0f, h - py * 2.0f);
|
||||
child->ops->layout(
|
||||
child, x + data->l, y + data->t, w - data->l - data->r,
|
||||
h - data->t - data->d);
|
||||
child = child->next_sibling;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue