Return-Path: X-Original-To: apmail-flex-commits-archive@www.apache.org Delivered-To: apmail-flex-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D3A7010938 for ; Thu, 25 Apr 2013 00:59:12 +0000 (UTC) Received: (qmail 40036 invoked by uid 500); 25 Apr 2013 00:59:11 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 39965 invoked by uid 500); 25 Apr 2013 00:59:11 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 39816 invoked by uid 99); 25 Apr 2013 00:59:11 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Apr 2013 00:59:11 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D25EB880C8D; Thu, 25 Apr 2013 00:59:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jmclean@apache.org To: commits@flex.apache.org Date: Thu, 25 Apr 2013 00:59:17 -0000 Message-Id: <57ee0473c26f437ca0f38f22a998a4c2@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [08/10] git commit: [flex-sdk] - 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/480dpi Commit: 478f0a567b103fed0ac53cc0483ab70246655b39 Parents: c5c9f84 Author: Justin Mclean Authored: Thu Apr 25 10:10:10 2013 +1000 Committer: Justin Mclean 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 * * * - * + * + * *
160 DPI<200 DPI
240 DPI>=200 DPI and <280 DPI
320 DPI>=280 DPI
320 DPI>=280 DPI and <400 DPI
480 DPI>=400 DPI
*

* 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; * CharacteristicDescription * Default size160 DPI: 26x26 pixels
* 240 DPI: 40x40 pixels
- * 320 DPI: 52x52 pixels + * 320 DPI: 52x52 pixels
+ * 380 DPI: 80x80 pixels
* Minimum size20x20 pixels * Maximum sizeNo limit * @@ -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 Application.runtimeDPI - * is DPIClassification.DPI_320. - * - * @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 Application.runtimeDPI + * is DPIClassification.DPI_320. + * + * @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 Application.runtimeDPI + * is DPIClassification.DPI_480. + * + * @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;