You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2017/11/14 09:02:19 UTC

[GitHub] Harbs closed pull request #88: Adjust alert title bar size so that it doesn't go over it's RHS border

Harbs closed pull request #88: Adjust alert title bar size so that it doesn't go over it's RHS border
URL: https://github.com/apache/royale-asjs/pull/88
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/Alert.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/Alert.as
index a3857cb7b..5d45b703d 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/Alert.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/Alert.as
@@ -127,7 +127,7 @@ package org.apache.royale.html
             titleBar = new TitleBar();
             addElement(titleBar);
             titleBar.element.id = 'titleBar';
-            titleBar.percentWidth = 100;
+            titleBar.percentWidth = 98; // so doesn't go over RHS border
             titleBar.height = 24;
             titleBar.element.style.top = "0px";
             titleBar.element.style.right = "0px";
@@ -147,7 +147,7 @@ package org.apache.royale.html
             
             // add a place for the buttons
             buttonArea = new Container();
-            buttonArea.percentWidth = 100;
+            buttonArea.percentWidth = 98; // so doesn't go over RHS border
             buttonArea.height = 28;
             addElement(buttonArea);
             buttonArea.element.style.marginTop = "6px";
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/AlertView.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/AlertView.as
index 2af89695f..8a12ddfd1 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/AlertView.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/AlertView.as
@@ -155,12 +155,12 @@ package org.apache.royale.html.beads
 			var titleMeasure:IMeasurementBead = _titleBar.measurementBead;
 			var ctrlMeasure:IMeasurementBead  = _controlBar.measurementBead;
 			var maxWidth:Number = Math.max(titleMeasure.measuredWidth, ctrlMeasure.measuredWidth, labelMeasure.measuredWidth);
-			
+			var border:Rectangle = CSSContainerUtils.getBorderMetrics(_strand);
 			var metrics:Rectangle = CSSContainerUtils.getBorderAndPaddingMetrics(_strand);
 
-			_titleBar.x = 0;
-			_titleBar.y = 0;
-			_titleBar.width = maxWidth;
+			_titleBar.x = border.left;
+			_titleBar.y = border.top;
+			_titleBar.width = maxWidth - border.left - border.right;
 			_titleBar.height = 25;
 			_titleBar.dispatchEvent(new Event("layoutNeeded"));
 			


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services