Revision: 2319
          http://sourceforge.net/p/swingme/code/2319
Author:   yuranet
Date:     2014-08-05 23:33:04 +0000 (Tue, 05 Aug 2014)
Log Message:
-----------
when working out the size of each col and row in a grid, we ask each component how much space it needs, but we didnt take into account that if it spans cols or rows its already going to get at least the size of the gap between the cols/rows in space
Modified Paths:
--------------
    SwingME/src/net/yura/mobile/gui/layout/GridBagLayout.java
Modified: SwingME/src/net/yura/mobile/gui/layout/GridBagLayout.java
===================================================================
--- SwingME/src/net/yura/mobile/gui/layout/GridBagLayout.java	2014-08-01 00:13:33 UTC (rev 2318)
+++ SwingME/src/net/yura/mobile/gui/layout/GridBagLayout.java	2014-08-05 23:33:04 UTC (rev 2319)
@@ -158,7 +158,8 @@
                             if (cache == null) {
                                     cache = new int[4][count];
                             }
-                            cache[0][i] = subComponent.getWidthWithBorder();
+                            // YURA: In thinlet is just uses the width here.
+                            cache[0][i] = subComponent.getWidthWithBorder() - (colspan - 1) * gap;
                             cache[2][i] = weightx;
                             if ((nextsize == 0) || (colspan < nextsize)) {
                                     nextsize = colspan;
@@ -171,7 +172,8 @@
                             if (cache == null) {
                                     cache = new int[4][count];
                             }
-                            cache[1][i] = subComponent.getHeightWithBorder();
+                            // YURA: In thinlet is just uses the height here.
+                            cache[1][i] = subComponent.getHeightWithBorder() - (rowspan - 1) * gap;
                             cache[3][i] = weighty;
                             if ((nextsize == 0) || (rowspan < nextsize)) {
                                     nextsize = rowspan;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |