flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [3/5] git commit: [flex-sdk] - Added support for 480 dpi
Date Thu, 25 Apr 2013 03:08:19 GMT
Added support for 480 dpi


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

Branch: refs/heads/480dpi
Commit: f3482b2211669928adc758dc6d7ff7522ed2b0a0
Parents: a9aeb68
Author: Justin Mclean <jmclean@apache.org>
Authored: Thu Apr 25 13:04:39 2013 +1000
Committer: Justin Mclean <jmclean@apache.org>
Committed: Thu Apr 25 13:04:39 2013 +1000

----------------------------------------------------------------------
 mustella/as3/src/mustella/ConditionalValue.as     |    2 +-
 mustella/as3/src/mustella/TargetConfigurations.as |    4 +++-
 mustella/as3/src/mustella/Util.as                 |    7 +++++--
 3 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f3482b22/mustella/as3/src/mustella/ConditionalValue.as
----------------------------------------------------------------------
diff --git a/mustella/as3/src/mustella/ConditionalValue.as b/mustella/as3/src/mustella/ConditionalValue.as
index 3b84c8f..4e11220 100644
--- a/mustella/as3/src/mustella/ConditionalValue.as
+++ b/mustella/as3/src/mustella/ConditionalValue.as
@@ -52,7 +52,7 @@ package
 		public var targetOS:String = null;
 
 		// General, "marketing number" pixel density
-		[Inspectable(enumeration="160,240,320")]
+		[Inspectable(enumeration="160,240,320,480")]
 		public var deviceDensity:Number = -1;
 
 		// Exact pixel density reported by AIR's Capabilities.screenDPI

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f3482b22/mustella/as3/src/mustella/TargetConfigurations.as
----------------------------------------------------------------------
diff --git a/mustella/as3/src/mustella/TargetConfigurations.as b/mustella/as3/src/mustella/TargetConfigurations.as
index c8355eb..711d0aa 100644
--- a/mustella/as3/src/mustella/TargetConfigurations.as
+++ b/mustella/as3/src/mustella/TargetConfigurations.as
@@ -52,6 +52,7 @@ import mx.core.FlexGlobals;
 
 public class TargetConfigurations
 {
+	//TODO add some larger screens?
 	public static var configs:Array = [
 		{ configID: "160_01", deviceDensity: 160, os: DeviceNames.WIN, screenDPI: 160, deviceWidth:
320, deviceHeight: 455, color: null, osVersion: null},
 		{ configID: "160_02", deviceDensity: 160, os: DeviceNames.MAC, screenDPI: 160, deviceWidth:
320, deviceHeight: 455, color: null, osVersion: null},		
@@ -63,7 +64,8 @@ public class TargetConfigurations
 		{ configID: "240_05", deviceDensity: 240, os: DeviceNames.ANDROID, screenDPI: 240, deviceWidth:
480, deviceHeight: 762, color: null, osVersion: null},
 		{ configID: "320_01", deviceDensity: 320, os: DeviceNames.WIN, screenDPI: 320, deviceWidth:
640, deviceHeight: 960, color: null, osVersion: null},
 		{ configID: "320_02", deviceDensity: 320, os: DeviceNames.MAC, screenDPI: 320, deviceWidth:
640, deviceHeight: 960, color: null, osVersion: null},		
-		{ configID: "320_03", deviceDensity: 320, os: DeviceNames.IOS, screenDPI: 326, deviceWidth:
640, deviceHeight: 960, color: null, osVersion: null}
+		{ configID: "320_03", deviceDensity: 320, os: DeviceNames.IOS, screenDPI: 326, deviceWidth:
640, deviceHeight: 960, color: null, osVersion: null},
+		{ configID: "480_01", deviceDensity: 480, os: DeviceNames.ANDROID, screenDPI: 441, deviceWidth:
1080, deviceHeight: 1920, color: null, osVersion: null}
 	];
 	
 	/**

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f3482b22/mustella/as3/src/mustella/Util.as
----------------------------------------------------------------------
diff --git a/mustella/as3/src/mustella/Util.as b/mustella/as3/src/mustella/Util.as
index b500183..2c22f8a 100644
--- a/mustella/as3/src/mustella/Util.as
+++ b/mustella/as3/src/mustella/Util.as
@@ -25,7 +25,7 @@ package
 	 **/
 	public class Util{
 		/**
-		 * Rounds to 160, 240, or 320 using Flex's code from RuntimeDPIProvider.as.
+		 * Rounds to 160, 240, 320 or 480 using Flex's code from RuntimeDPIProvider.as.
 		 **/
 		public static function roundDeviceDensity( dpi:int ):int{
 			if ( dpi < 200 )
@@ -34,7 +34,10 @@ package
 			if (dpi <= 280)
 			    return 240;
 			
-			return 320;
+			if (dpi <= 400)
+				return 320;
+						
+			return 480;
 		}
 	}
 }
\ No newline at end of file


Mime
View raw message