when sized to content, have to take content size and add in padding and borders 
again


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/531c9e14
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/531c9e14
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/531c9e14

Branch: refs/heads/release0.8.0
Commit: 531c9e1417e547e90dfb6ffa1f605d9e55da6631
Parents: 8dc2727
Author: Alex Harui <aha...@apache.org>
Authored: Wed Jun 7 22:45:54 2017 -0700
Committer: Alex Harui <aha...@apache.org>
Committed: Wed Jun 7 23:23:05 2017 -0700

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/html/beads/GroupView.as   | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/531c9e14/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/GroupView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/GroupView.as
 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/GroupView.as
index 2a982c2..2921b65 100644
--- 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/GroupView.as
+++ 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/GroupView.as
@@ -268,6 +268,15 @@ package org.apache.flex.html.beads
                {
                        var host:UIBase = _strand as UIBase;
                        var contentSize:Size = calculateContentSize();
+                       var border:org.apache.flex.geom.Rectangle = 
CSSContainerUtils.getBorderMetrics(this._strand);
+                       contentSize.width += border.left + border.right;
+                       contentSize.height += border.top + border.bottom;
+                       var padding:org.apache.flex.geom.Rectangle = 
CSSContainerUtils.getPaddingMetrics(this._strand);
+                       // add padding.left since it wasn't considered in 
contentSize,
+                       // and add border.right so the border can be drawn in 
that column of pixels
+                       contentSize.width += padding.left + border.right; 
+                       contentSize.height += padding.top + border.top;
+                       
 
                        if (host.isWidthSizedToContent() && 
host.isHeightSizedToContent()) {
                                host.setWidthAndHeight(contentSize.width, 
contentSize.height, true);

Reply via email to