Commit a389808d authored by Monty Montgomery's avatar Monty Montgomery

Fix a sign error that caused the lower edge of a multibar reading to

be xpad*2 too low



git-svn-id: https://svn.xiph.org/trunk/postfish@6583 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent a9e4eb0f
...@@ -127,7 +127,7 @@ static void compute(Multibar *m,float *lowvals, float *highvals, int n){ ...@@ -127,7 +127,7 @@ static void compute(Multibar *m,float *lowvals, float *highvals, int n){
if(lowvals[i]>=m->levels[j]){ if(lowvals[i]>=m->levels[j]){
if(lowvals[i]<=m->levels[j+1]){ if(lowvals[i]<=m->levels[j+1]){
float del=(lowvals[i]-m->levels[j])/(m->levels[j+1]-m->levels[j]); float del=(lowvals[i]-m->levels[j])/(m->levels[j+1]-m->levels[j]);
pixlo[i]=(j+del)/m->labels*(widget->allocation.width-xpad*2-1)-xpad; pixlo[i]=(j+del)/m->labels*(widget->allocation.width-xpad*2-1)+xpad;
break; break;
}else if(j==m->labels){ }else if(j==m->labels){
pixlo[i]=widget->allocation.width-xpad+1; pixlo[i]=widget->allocation.width-xpad+1;
...@@ -147,7 +147,6 @@ static void compute(Multibar *m,float *lowvals, float *highvals, int n){ ...@@ -147,7 +147,6 @@ static void compute(Multibar *m,float *lowvals, float *highvals, int n){
} }
}else }else
break; break;
} }
/* dampen movement according to setup */ /* dampen movement according to setup */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment