flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurice Amsellem <maurice.amsel...@systar.com>
Subject RE: Issue with mobile UI default sizes
Date Wed, 30 Oct 2013 23:54:43 GMT
>I generally don't setting the application dpi to anything to avoid any scaling.

I understand and I agree that the rendering is more accurate. 

However,  I think people will use applicationDPI because it simplifies their code.  
That is, without applicationDPI,  many "absolute" UI properties, that are not css styles,
such as layout gaps, itemHeight, or even with and height, etc.. must be set trough DPI switch
case in ActionScript, 
Whereas if applicationDPI is set, you can just set them through MXML, and let the scaling
do the job.

So that's the problem:
1)  if you set applicationDPI:  
- you can simply set absolute values in  MXML in your code
- but you lose all the DPI calculations and @media CSS in Flex UI components, and get fractional
display

2) you don't set applicationDPI:
-  you get accurate rounded DPI sizes and @media css for UI components
- you have to do complex DPI calculations for the absolute sizes in your code.

So maybe we would need a "mixed" mode that gets the best of both approaches:
- Do not set applicationDPI, to use all the nice @media css and DPI calculations of standard
components
- provide a way to set absolute values in MXML and get them automatically scaled according
to the DPI,  maybe using the same technique as [PercentProxy], may [DPIProxy]
Example:
<HorizontalLayout gap="10pt" /> 
=> the "pt" will indicate to use a [DPIProxy] property, in the same way that "80%" indicates
to use the [PercentProxy] .


What do you think? 

Maurice 

-----Message d'origine-----
De : Justin Mclean [mailto:justin@classsoftware.com] 
Envoyé : jeudi 31 octobre 2013 00:29
À : dev@flex.apache.org
Objet : Re: Issue with mobile UI default sizes

Hi,

> There are very few UI components that compensate for this behavior ( typically StyleableTextField,
) 
Yep but usually only for IOS search code for isiOS and you find that.

> Is that correct ?
As far as I'm aware yes.  I generally don't setting the application dpi to anything to avoid
any scaling.

Thanks,
Justin

Mime
View raw message