This code works for me (by scaling a group). I leave it you to determine
a suitable calculation for newScale value. Custom runtimeDPIprovider not
needed as default returns 160 (which is fine)
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
applicationDPI="160"
creationComplete="init()">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function init():void
{
var newScale:Number = 2;
grp.scaleX = newScale;
grp.scaleY = newScale;
}
]]>
</fx:Script>
<s:Group id="grp"
left="0" right="0" top="0" bottom="0">
<s:Label id="LeftMarker" left="0" verticalCenter="0"
text="<--- LEFT" fontSize="24"/>
<s:Label id="MiddleMarker" horizontalCenter="0"
verticalCenter="0" text="> > > MIDDLE < < <"
fontSize="24"/>
<s:Label id="RightMarker" right="0" verticalCenter="0"
text="RIGHT --->" fontSize="24"/>
</s:Group>
</s:WindowedApplication>
Lee Burrows
ActionScripter
On 05/12/2014 17:37, Subscriptions wrote:
I havent tested it but a possible workaround would be to avoid flex
scaling completely and write your own... either set stage.scaleX/Y as
appropriate (or maybe you will need to put all your content inside a
group and scale the group).
Having said that, the more i think about it, i'm not sure scaling a
desktop app is ideal (even if window cant be resized by user) - but
i'm guessing your app is too far into development to change that?
Lee Burrows
ActionScripter
On 05/12/2014 16:54, Jason Moore wrote:
Hi All,
I submitted a bug to the Jira system around how the application
scaling using applicationDPI for desktop Air Apps seems to be broken.
I've included screenshots, example code etc.. so I won't go into
detail here, if you're interested and can help please do have a look.
https://issues.apache.org/jira/browse/FLEX-34653
Anyway, I've checked out the source... and have been playing around
but I can't seem to get any changes to the WindowedApplication.as
(\frameworks\projects\airspark\src\spark\components) to do anything.
Trace statements don't work, I've even put in deliberate errors... to
no effect. Changes and trace statements in other parts of the
framework such as systemManager.as appear so I know I'm compiling and
using my edited source.
Is there something special about the WindowedApplication.as ... is it
overridden somewhere in the build?
Any help appreciated.
Jason :)