diff options
| -rw-r--r-- | ui.cpp | 8 | 
1 files changed, 5 insertions, 3 deletions
| @@ -763,11 +763,13 @@ UI::Rect UI::Container::layout(const Rect& avail) {  	clip = avail;  	clip.clip(ui->area);  	for (child = children; child; child = child->next) { +		int h;  		Rect r = child->layout(area); -		area.y += r.h + padding; -		area.h -= r.h; +		h = r.h + padding; +		area.y += h; +		area.h -= h;  		if (r.w > used.w) used.w = r.w; -		used.h += r.h; +		used.h += h;  	}  	bound = used;  	return used; |