flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [1/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-369 stop text flowing outside of Alert box
Date Sat, 17 May 2014 15:10:00 GMT
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 587354995 -> 79073bf23


FLEX-369 stop text flowing outside of Alert box


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

Branch: refs/heads/develop
Commit: e4bd86d0b068283c570bbdd2f4289bb67c30524f
Parents: 6fc0cfa
Author: Justin Mclean <jmclean@apache.org>
Authored: Sat May 17 08:03:41 2014 -0700
Committer: Justin Mclean <jmclean@apache.org>
Committed: Sat May 17 08:03:41 2014 -0700

----------------------------------------------------------------------
 .../projects/mx/src/mx/controls/alertClasses/AlertForm.as      | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e4bd86d0/frameworks/projects/mx/src/mx/controls/alertClasses/AlertForm.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mx/src/mx/controls/alertClasses/AlertForm.as b/frameworks/projects/mx/src/mx/controls/alertClasses/AlertForm.as
index ce7e525..0a9afd2 100644
--- a/frameworks/projects/mx/src/mx/controls/alertClasses/AlertForm.as
+++ b/frameworks/projects/mx/src/mx/controls/alertClasses/AlertForm.as
@@ -331,6 +331,7 @@ public class AlertForm extends UIComponent implements IFontContextComponent
 
 		// Limit the height if it exceeds the height of the Stage.
 		prefHeight = Math.min(prefHeight, screen.height * 0.75);
+		
 		// Add space for buttons, spacing between buttons and text,
 		// and top/bottom margins
 		prefHeight += buttons[0].height + (3 * 8);
@@ -379,6 +380,11 @@ public class AlertForm extends UIComponent implements IFontContextComponent
 		}
 
 		var newHeight:Number = textField.getExplicitOrMeasuredHeight();
+		var maxHeight:Number = unscaledHeight - buttons[0].height;
+		
+		if (newHeight > maxHeight)
+			newHeight = maxHeight;
+		
 		textField.move(newX, Math.round((newY - newHeight) / 2));
 		textField.setActualSize(textWidth+5, newHeight);
 	}


Mime
View raw message