A patch file is file that contains a list of changes to the files in the SDK.

Here's what an patch file looks like.

From ffc82f4170afdc1a81af60ed74890a9229755ecc Mon Sep 17 00:00:00 2001
From: mauriceamsellem <maurice.amsellem@systar.com>
Date: Thu, 1 Aug 2013 19:32:13 +0200
Subject: [PATCH] Fix FLEX-33643

improved skin class
---
 .../src/spark/skins/spark/CallOutSkin.mxml         | 56 +++++++++++++++-------
 1 file changed, 40 insertions(+), 16 deletions(-)

diff --git a/frameworks/projects/experimental/src/spark/skins/spark/CallOutSkin.mxml b/frameworks/projects/experimental/src/spark/skins/spark/CallOutSkin.mxml
index d072db1..39cda16 100644
--- a/frameworks/projects/experimental/src/spark/skins/spark/CallOutSkin.mxml
+++ b/frameworks/projects/experimental/src/spark/skins/spark/CallOutSkin.mxml
@@ -32,12 +32,14 @@
 			
 			import spark.components.ArrowDirection;
 			
-			public static const ARROW_SIDE_LENGHT:int = 18;
+			public static const ARROW_SIDE_LENGHT:int = 24;
 			
 			public static const RADIUS:int = 5;
 			
 			public static const CONTENT_GAP:int = 10;
 			
+        private static const BORDER_THICKNESS:int = 2;
+
 			use namespace mx_internal;
 			
 			override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
@@ -62,12 +64,15 @@
 
 						arrowPath.data		= "M " + ARROW_SIDE_LENGHT/2 + " 0 L " + ARROW_SIDE_LENGHT/2 + " " + ARROW_SIDE_LENGHT + " L 0 " + ARROW_SIDE_LENGHT/2 + " Z";
 						
-						backgroundGroup.left	= arrowGraphic.width;
+                    backgroundGroup.left = arrowGraphic.width - BORDER_THICKNESS;
 						backgroundGroup.right	= arrowGraphic.width * -1;
-						
-						contentGroup.left	= CONTENT_GAP + arrowGraphic.width;
+
+                    	contentGroup.left = CONTENT_GAP + arrowGraphic.width - BORDER_THICKNESS;
 						contentGroup.right	= CONTENT_GAP - arrowGraphic.width;
-						
+
+                    	coverRect.top = coverRect.bottom = BORDER_THICKNESS + 1;
+                    	coverRect.width = BORDER_THICKNESS;
+                    	coverRect.right = 0;
 						arrowGraphic.left	= 0;
 					}
 					else if(arDi == "right")
@@ -78,11 +83,15 @@
 						arrowPath.data		= "M 0 0 L " + ARROW_SIDE_LENGHT/2 + " " + ARROW_SIDE_LENGHT/2 + " L 0 " + ARROW_SIDE_LENGHT + " Z";
 						
 						backgroundGroup.left	= arrowGraphic.width * -1;
-						backgroundGroup.right	= arrowGraphic.width;
-						
+                    	backgroundGroup.right = arrowGraphic.width - BORDER_THICKNESS ;
+
 						contentGroup.left	= CONTENT_GAP - arrowGraphic.width;
-						contentGroup.right	= CONTENT_GAP + arrowGraphic.width;
-						
+                    	contentGroup.right = CONTENT_GAP + arrowGraphic.width- BORDER_THICKNESS ;
+
+                    	coverRect.top = coverRect.bottom = BORDER_THICKNESS + 1;
+                    	coverRect.width = BORDER_THICKNESS;
+                    	coverRect.left = 0;
+
 						arrowGraphic.right	= 0;
 					}
 					else if(arDi == "up")
@@ -90,15 +99,21 @@
 						arrowGraphic.height	= ARROW_SIDE_LENGHT/2;
 						arrowGraphic.width	= ARROW_SIDE_LENGHT;
 						
+
 						arrowPath.data		= "M 0 " + ARROW_SIDE_LENGHT/2 + " L " + ARROW_SIDE_LENGHT + " " + ARROW_SIDE_LENGHT/2 + " L " + ARROW_SIDE_LENGHT/2 + " 0 Z";
 						
-						backgroundGroup.top		= arrowGraphic.height;
+                    	backgroundGroup.top = arrowGraphic.height - BORDER_THICKNESS;
 						backgroundGroup.bottom	= arrowGraphic.height * -1;
 						
-						contentGroup.top	= CONTENT_GAP + arrowGraphic.height;
+                    	contentGroup.top = CONTENT_GAP + arrowGraphic.height - BORDER_THICKNESS;
 						contentGroup.bottom	= CONTENT_GAP - arrowGraphic.height;
-						
+
+                    	coverRect.left = coverRect.right = BORDER_THICKNESS + 1;
+                    	coverRect.height = BORDER_THICKNESS;
+                    	coverRect.bottom = 0;
+
 						arrowGraphic.top	= 0;
+
 					}
 					else if(arDi == "down")
 					{
@@ -108,12 +123,16 @@
 						arrowPath.data		= "M 0 0 L " + ARROW_SIDE_LENGHT/2 + " " + ARROW_SIDE_LENGHT/2 + " L " + ARROW_SIDE_LENGHT + " 0 Z";
 						
 						backgroundGroup.top		= arrowGraphic.height * -1;
-						backgroundGroup.bottom	= arrowGraphic.height;
-						
+                    	backgroundGroup.bottom = arrowGraphic.height + BORDER_THICKNESS + 1;
+
 						contentGroup.top	= CONTENT_GAP - arrowGraphic.height;
-						contentGroup.bottom	= CONTENT_GAP + arrowGraphic.height;
-						
+                    	contentGroup.bottom = CONTENT_GAP + arrowGraphic.height + BORDER_THICKNESS + 1;
+
+                    	coverRect.left = coverRect.right = BORDER_THICKNESS + 1;
+                    	coverRect.height = BORDER_THICKNESS;
+                    	coverRect.top = 0;
 						arrowGraphic.bottom	= 0;
+
 					}
 					
 					if(arDi == "up" || arDi == "down")
@@ -204,6 +223,11 @@
 					<s:SolidColor color="0x000000"/>
 				</s:fill>
 			</s:Path>
+            <s:Rect id="coverRect" >
+                <s:fill>
+                    <s:SolidColor color="0xFFFFFF"/>
+                </s:fill>
+            </s:Rect>
 		</s:Graphic>
 	</s:Group>
 </s:SparkSkin>
\ No newline at end of file
-- 
1.8.1.6

It's best if you create the patch file from the the root of the Apache Flex SDK as that way the patch file will contain complete paths which makes it easier for a committer to apply the patch.

There are many way of creating a patch file.

  • From the command line using git
    git diff <file or directory to generate patch from> > fix.patch
    
  • From a github pull request. Take the github pull request URL and adding ".patch" to the end of the URL.
    https://github.com/apache/flex-sdk/pull/3.patch
    
  • Most IDE's have a build in way to generate patch files.

In Flash Builder it's a simple as right clicking on the file or directory and selecting Team -> Create Patch...

  • No labels