Browse Source

oui: small layout improvement when mixing fixed and dynamic child items

pull/1/head
Leonard Ritter 10 years ago
parent
commit
71482224d5
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      oui.h

+ 3
- 3
oui.h View File

@@ -956,10 +956,10 @@ static void uiLayoutChildItem(UIitem *pparent, UIitem *pitem, int *dyncount, int
} break;
case UI_HFILL: {
if (pitem->size.v[dim]) { // hard maximum size; can't stretch
if (hasl)
pitem->rect.v[dim] = x+s-pitem->rect.v[wdim]-pitem->margins[wdim];
else
if (!hasl)
pitem->rect.v[dim] = x+pitem->margins[dim];
else
pitem->rect.v[dim] = x+s-pitem->rect.v[wdim]-pitem->margins[wdim];
} else {
if (1) { //!pitem->rect.v[wdim]) {
int width = (pparent->rect.v[wdim] - pparent->computed_size.v[dim]);


Loading…
Cancel
Save