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

View File

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