respect min_height in the frame rescaling mechanism in column-default too

This commit is contained in:
Sander van Dijk 2006-04-13 22:20:54 +00:00
parent 92814d3fd4
commit 9ba83fab07

View File

@ -108,6 +108,8 @@ arrange_column(Area *a, Bool dirty)
{
unsigned int i, yoff = a->rect.y, h, dy = 0;
float scale = 1.0;
unsigned int min_height = 2 * height_of_bar();
int hdiff = 0;
if(!a->frame.size)
return;
@ -130,6 +132,10 @@ arrange_column(Area *a, Bool dirty)
f->rect.y = yoff;
f->rect.width = a->rect.width;
f->rect.height *= scale;
if(f->rect.height < min_height)
f->rect.height = min_height;
else if((hdiff = f->rect.y + f->rect.height - a->rect.height + (a->frame.size - i) * min_height) > 0)
f->rect.height -= hdiff;
if(i == a->frame.size - 1)
f->rect.height = a->rect.height - f->rect.y + a->rect.y;
yoff += f->rect.height;