andri471 / mad-components

Automatically exported from code.google.com/p/mad-components
0 stars 0 forks source link

Auto scale bug? #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set xml root tag dpi attribute a value of 320, and make a design adapted to 
that size.
2. Simulate or test on a smaller screen.

What is the expected output? What do you see instead?
I'd expect the displayed layout to be resized to match the smaller screen, but 
it remains to be the same.

What version of the product are you using? On what operating system?
Tested on Flash Develop, Windows 7, AIR 3.3, although all this doesn't matter 
much.

Please provide any additional information below.
I know the dpi attribute is somehow undocumented, but I consider it to be 
rather important.

The cause of the problem is in UI.as, in the newAttributes function replace:

        if (_autoScale && Capabilities.screenDPI > _dpi) {

with:

        if (_autoScale) {

It seems to work fine, I don't know if there is any case where removing the 
extra condition will bring problems. Maybe the framework should standardize the 
dpis to 160, 240 and 320?

Original issue reported on code.google.com by neverbi...@gmail.com on 24 Jun 2012 at 11:23

GoogleCodeExporter commented 9 years ago
I've seen some cases where removing the condition causes problems. 
Standardizing the dpis seems to be the best solution.

Original comment by neverbi...@gmail.com on 4 Jul 2012 at 10:28

GoogleCodeExporter commented 9 years ago

Original comment by doc.andr...@gmail.com on 12 Jul 2012 at 11:32

GoogleCodeExporter commented 9 years ago
Will the issue be fixed in the next release? I see nothing changed in the 
repository, but I guess it will be uploaded later.

Also, the problem I was having with my change is that when developing for what 
you expect to be 160dpi, using an iPhone 3gs screen scales the content to 
unexpected values. That's why I said that standardizing the dpis seems to be 
the best approach.

Original comment by neverbi...@gmail.com on 12 Jul 2012 at 4:08