Revision: 4795
          http://sourceforge.net/p/vexi/code/4795
Author:   clrg
Date:     2015-05-12 21:58:49 +0000 (Tue, 12 May 2015)
Log Message:
-----------
Fix spacing issues

Modified Paths:
--------------
    
branches/vexi3_integrated_layout/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp

Modified: 
branches/vexi3_integrated_layout/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp
===================================================================
--- 
branches/vexi3_integrated_layout/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp
      2015-05-10 08:12:50 UTC (rev 4794)
+++ 
branches/vexi3_integrated_layout/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp
      2015-05-12 21:58:49 UTC (rev 4795)
@@ -722,7 +722,9 @@
                     new_contentwidth += c.nominalWidth() + spacing;
                     prior_margin = c.margin.right;
                 }
-                new_contentwidth += max(prior_margin, padding.right);
+                int final_spacing = max(prior_margin, padding.right);
+                new_contentwidth += final_spacing;
+                box_spacing += final_spacing;
             } else {
                 // maximum child contentwidth
                 for (Box c = getChild(i=0); c != null; c = getChild(++i)) {
@@ -946,7 +948,7 @@
 
                         // if there is 'slack' (child boxes do not consume 
parent width) then
                         // align determines whether we pack boxes to left, 
centre, or right
-                        int offset_x = alignLeft() ? 0 : 
(int)(((float)width-totalsize)/(float)(alignRight()?1:2));
+                        int offset_x = alignLeft() ? 0 : 
(int)(((float)packingspace-totalsize)/(float)(alignRight()?1:2));
                         
                         // we use total (a float) to keep tabs on final layout 
totals
                         // so we do not get stray pixel sized gaps caused by 
rounding
@@ -1093,7 +1095,7 @@
 
                         // if there is 'slack' (child boxes do not consume 
parent width) then
                         // align determines whether we pack boxes to left, 
centre, or right
-                        int offset_y = alignTop() ? 0 : 
(int)(((float)height-totalsize)/(float)(alignBottom()?1:2));
+                        int offset_y = alignTop() ? 0 : 
(int)(((float)packingspace-totalsize)/(float)(alignBottom()?1:2));
                         
                         // we use total (a float) to keep tabs on final layout 
totals
                         // so we do not get stray pixel sized gaps caused by 
rounding

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to