You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2013/05/12 12:49:14 UTC

[08/24] git commit: [flex-sdk] [refs/heads/develop] - Added support for 480dpi

Added support for 480dpi


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

Branch: refs/heads/develop
Commit: 478f0a567b103fed0ac53cc0483ab70246655b39
Parents: c5c9f84
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Apr 25 10:10:10 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Apr 25 10:10:10 2013 +1000

----------------------------------------------------------------------
 .../spark/src/spark/components/Application.as      |    5 +-
 .../spark/src/spark/components/BusyIndicator.as    |   10 +++-
 .../spark/src/spark/utils/MultiDPIBitmapSource.as  |   50 +++++++++++----
 3 files changed, 49 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/478f0a56/frameworks/projects/spark/src/spark/components/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/Application.as b/frameworks/projects/spark/src/spark/components/Application.as
index b28ffb9..e4c3c1d 100644
--- a/frameworks/projects/spark/src/spark/components/Application.as
+++ b/frameworks/projects/spark/src/spark/components/Application.as
@@ -912,7 +912,7 @@ public class Application extends SkinnableContainer
      */
     private var _applicationDPI:Number = NaN;
     
-    [Inspectable(category="General", enumeration="160,240,320")]
+    [Inspectable(category="General", enumeration="160,240,320,480")]
     
     /**
      *  The DPI of the application.
@@ -985,7 +985,8 @@ public class Application extends SkinnableContainer
      *     <table class="innertable">
      *        <tr><td>160 DPI</td><td>&lt;200 DPI</td></tr>
      *        <tr><td>240 DPI</td><td>&gt;=200 DPI and &lt;280 DPI</td></tr>
-     *        <tr><td>320 DPI</td><td>&gt;=280 DPI</td></tr>
+     *        <tr><td>320 DPI</td><td>&gt;=280 DPI and &lt;400 DPI</td></tr>
+	 *        <tr><td>480 DPI</td><td>&gt;=400 DPI</td></tr>
      *     </table>
      *  </p>
      * 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/478f0a56/frameworks/projects/spark/src/spark/components/BusyIndicator.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/BusyIndicator.as b/frameworks/projects/spark/src/spark/components/BusyIndicator.as
index 6c86e52..b2184ae 100644
--- a/frameworks/projects/spark/src/spark/components/BusyIndicator.as
+++ b/frameworks/projects/spark/src/spark/components/BusyIndicator.as
@@ -104,7 +104,8 @@ use namespace mx_internal;
  *     <tr><th>Characteristic</th><th>Description</th></tr>
  *     <tr><td>Default size</td><td>160 DPI: 26x26 pixels<br>
  *                                  240 DPI: 40x40 pixels<br>
- *                                  320 DPI: 52x52 pixels</td></tr>
+ *                                  320 DPI: 52x52 pixels<br>
+ * 									380 DPI: 80x80 pixels<br></td></tr>
  *     <tr><td>Minimum size</td><td>20x20 pixels</td></tr>
  *     <tr><td>Maximum size</td><td>No limit</td></tr>
  *  </table>
@@ -323,7 +324,12 @@ public class BusyIndicator extends UIComponent
         
         // Set the default measured size depending on the
         // applicationDPI
-        if (applicationDPI == DPIClassification.DPI_320)
+		if (applicationDPI == DPIClassification.DPI_480)
+		{
+			measuredWidth = 80;
+			measuredHeight = 80;
+		}
+		else if (applicationDPI == DPIClassification.DPI_320)
         {
             measuredWidth = 52;
             measuredHeight = 52;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/478f0a56/frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as b/frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as
index 3735935..5a44dea 100644
--- a/frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as
+++ b/frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as
@@ -57,16 +57,27 @@ public class MultiDPIBitmapSource
      */
     public var source240dpi:Object;
     
-    /**
-     *  The source to use if the <code>Application.runtimeDPI</code> 
-     *  is <code>DPIClassification.DPI_320</code>.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion Flex 4.5
-     */
-    public var source320dpi:Object;
+	/**
+	 *  The source to use if the <code>Application.runtimeDPI</code> 
+	 *  is <code>DPIClassification.DPI_320</code>.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Flex 4.5
+	 */
+	public var source320dpi:Object;
+	
+	/**
+	 *  The source to use if the <code>Application.runtimeDPI</code> 
+	 *  is <code>DPIClassification.DPI_480</code>.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion ApacheFlex 4.10
+	 */
+	public var source480dpi:Object;
     
     /**
      *  Select one of the sourceXXXdpi properties based on the given DPI.  This
@@ -90,17 +101,30 @@ public class MultiDPIBitmapSource
         var source:Object = source160dpi;
         switch (desiredDPI)
         {
+			case DPIClassification.DPI_480:
+				source = source480dpi;
+				if (!source || source == "")
+					source = source320dpi;
+				if (!source || source == "")
+					source = source240dpi;
+				if (!source || source == "")
+					source = source160dpi;
+				break;
             case DPIClassification.DPI_160:
                 source = source160dpi;
                 if (!source || source == "")
                     source = source240dpi;
-                if (!source || source == "")
-                    source = source320dpi;
+				if (!source || source == "")
+					source = source320dpi;
+				if (!source || source == "")
+					source = source480dpi;
                 break;
             case DPIClassification.DPI_240:
                 source = source240dpi;
                 if (!source || source == "")
                     source = source320dpi;
+				if (!source || source == "")
+					source = source480dpi;
                 if (!source || source == "")
                     source = source160dpi;
                 break;
@@ -108,6 +132,8 @@ public class MultiDPIBitmapSource
                 source = source320dpi;
                 if (!source || source == "")
                     source = source240dpi;
+				if (!source || source == "")
+					source = source480dpi;
                 if (!source || source == "")
                     source = source160dpi;
                 break;