flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Heidegger ...@leichtgewicht.at>
Subject Re: [IDEAS] Flex: New user interface design
Date Mon, 27 Feb 2012 10:00:09 GMT
On 27/02/2012 08:02, Erik Lundgren wrote:
> We don't target the html/css stack yet. But we want to. So i think it is important to
count it in as soon as possible.
> CSS rendering of "real world units" seems stable but does not work exactly the way you
would expect.
> CSS user agents assumes a 96 ppi screen [1]. On my 113 ppi screen a 10 cm div renders
as a 8.5 cm div. Exactly the behavior I don't want: 1 cm in code, 85 mm on screen.
> This may of course still be helpful as a fixed northern star. Given the 96 ppi and the
browsers rendering we could calculate the run time screens ppi: 96 / (8.5 / 10) ).

In the HTML/CSS world dpi is "preset" and can be changed for 
accessability: For example in Chrome you can set the zoom to 150%. Then 
the cm size changes too! In other words the unit naming is misleading - 
utterly wrong - but it is the basis browsers use. There are extensions 
[1] available the set this zoom factor to the value that actually 
matches the screen. Internet explorer actually allows to get a the 
native dpi using screen.deviceXDPI [2]. If you are on windows the dpi 
will be taken using global scaling settings that can be changed in the 
control panel [3].

Here is the big problem with these settings: They can change over time. 
Current documentation on mobile dpi for Flex 4.6 [4] says to use the 
"initialization" [5] - That means that the layout and the sizes are not 
updated when the dpi changes. The dpi can change on mobile devices for 
example if you connect a HDMI monitor on the mobile device. It also 
takes the FlexGlobals.topLevelApplication but if you develop in AIr the 
screen size actually should be determined using the screen on which 
"most of the application" is. That is not supported in windows 7 but it 
could be by flex applications ....


PS.: I don't use mac what makes me slightly less interested in a 
solution for Mac. Sad-Linux-Panda.

[2] http://msdn.microsoft.com/en-us/library/ms533721(v=vs.85).aspx 


View raw message