mirror of
https://github.com/0intro/wmii
synced 2024-11-23 14:19:48 +03:00
small change
This commit is contained in:
parent
e0c943a09b
commit
47b79d6f83
@ -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;
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user