projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73bf57b
)
2002/08/21 00:11:42
author
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 06:50:15 +0000
(06:50 +0000)
committer
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 06:50:15 +0000
(06:50 +0000)
darcs-hash:
20040130065015
-2ba56-
147077ded627ca0fba829518349c1926b33e5c4c
.gz
CHANGES
patch
|
blob
|
history
src/org/xwt/Box.java
patch
|
blob
|
history
diff --git
a/CHANGES
b/CHANGES
index
36b6ba7
..
4c85a7f
100644
(file)
--- a/
CHANGES
+++ b/
CHANGES
@@
-384,4
+384,6
@@
17-Aug megacz Template.java: fixed a bug that was keeping retheme() from working
+20-Aug megacz Box.java: fixed rounding error
+
diff --git
a/src/org/xwt/Box.java
b/src/org/xwt/Box.java
index
1a1f672
..
c0891f5
100644
(file)
--- a/
src/org/xwt/Box.java
+++ b/
src/org/xwt/Box.java
@@
-830,10
+830,10
@@
public final class Box extends JSObject {
// arbitrarily distribute out any leftovers resulting from rounding errors
int last = 0;
- while(goal > total && total != last) {
+ while(goal != total && total != last) {
last = total;
for(Box bt = getChild(0); bt != null; bt = bt.nextSibling()) {
- int newsize = bound(bt.cmin(o), bt.size(o) + 1, bt.dmax(o));
+ int newsize = bound(bt.cmin(o), bt.size(o) + (goal > total ? 1 : -1), bt.dmax(o));
total += newsize - bt.size(o);
bt.set(size, o, newsize);
}