small change

This commit is contained in:
Sander van Dijk 2006-05-03 22:25:33 +02:00
parent e0c943a09b
commit 47b79d6f83
2 changed files with 4 additions and 2 deletions

View File

@ -110,7 +110,7 @@ relax_column(Area *a)
void
scale_column(Area *a, float h)
{
unsigned int i, yoff = 0;
unsigned int i, yoff;
unsigned int min_height = 2 * height_of_bar();
float scale, dy = 0;
int hdiff;
@ -121,6 +121,7 @@ scale_column(Area *a, float h)
for(i = 0; i < a->frame.size; i++)
dy += a->frame.data[i]->rect.height;
scale = h / dy;
yoff = 0;
for(i = 0; i < a->frame.size; i++) {
Frame *f = a->frame.data[i];
f->rect.height *= scale;

View File

@ -271,7 +271,7 @@ restack_view(View *v)
void
scale_view(View *v, float w)
{
unsigned int i, xoff = 0;
unsigned int i, xoff;
float scale, dx = 0;
int wdiff = 0;
@ -281,6 +281,7 @@ scale_view(View *v, float w)
for(i = 1; i < v->area.size; i++)
dx += v->area.data[i]->rect.width;
scale = w / dx;
xoff = 0;
for(i = 1; i < v->area.size; i++) {
Area *a = v->area.data[i];
a->rect.width *= scale;