Merge branch 'upstream' into subtree
[nikiroo-utils.git] / layout / StretchLayoutManager.java
index ee2bf5aba5e5f70d4da15e6376bcd36164b26f7e..4bcb0cffc4c29e3a6cb088efa7a8afa8f5c4bebd 100644 (file)
@@ -146,11 +146,11 @@ public class StretchLayoutManager implements LayoutManager {
      */
     private void layoutChildren() {
         double widthRatio = (double) width / originalWidth;
-        if (!Double.isFinite(widthRatio)) {
+        if (Math.abs(widthRatio) > Double.MAX_VALUE) {
             widthRatio = 1;
         }
         double heightRatio = (double) height / originalHeight;
-        if (!Double.isFinite(heightRatio)) {
+        if (Math.abs(heightRatio) > Double.MAX_VALUE) {
             heightRatio = 1;
         }
         for (TWidget child: children.keySet()) {