Sorry, the build is broken, so won't be available until it's fixed. -----Message d'origine----- De : Maurice Amsellem [mailto:maurice.amsel...@systar.com] Envoyé : samedi 22 mars 2014 23:08 À : dev@flex.apache.org Objet : RE: Advice needed on FLEX-33994
I have implemented and committed the new feature, as discussed. Testers are welcome. https://issues.apache.org/jira/browse/FLEX-33994 (extract from the JIRA description) the following @media selectors have been implemented: device-width : standard, current device width, depending on the orientation device-height : standard, current device height, depending on the orientation -flex-device-diagonal : non-standard, current device diagonal All three selectors can be expressed with units. The following units are valid: (no unit), px, pt, in, cm, dp no unit => physical pixels px => physical pixel pt => pixels-equivalent at 72 ppi dp => pixels-equivalent at 160 ppi. Note that pt, in and cm are based on "raw" device dpi, whereas dp is based on normalized "applicationDPI". For optimization reasons, -flex-device-diagonal is guaranteed to never change so that styles do not need to be recomputed. This is mainly useful on mobile devices. Examples of valid media queries: /* phones */ @media (-flex-max-device-diagonal: 5in) { global { fontSize: 24; } } /* tablets */ @media (-flex-min-device-diagonal: 5in) AND (-flex-max-device-diagonal: 11in) { global { fontSize: 16; } } _____ Note for Lee: deviceWidth, deviceHeigth and flexDeviceDiagonal are accessible in actionScript with eg. MediaQueryParser.instance.flexDeviceDiagonal This returns an object of type: mx.styles.CSSDimension (see Apache documentation for reference) ---------------- -----Message d'origine----- De : Lee Burrows [mailto:subscripti...@leeburrows.com] Envoyé : mercredi 19 mars 2014 19:52 À : dev@flex.apache.org Objet : Re: Advice needed on FLEX-33994 On 19/03/2014 18:41, Maurice Amsellem wrote: >> would be good to have this measurement available to the app in same >> way as osVersion, eg: Platform.diagonalSizeInInches > Good idea. > Does it matter if it 's not bindable ? (this is because Platform is all > static, so can't have any bindable props). Personally, i'm happy if it's not bindable. > Also, it will return a qualified object (CssDimension) with the following > props: > - value: Number > - unit: String > - pixelValue: int > - compare operator > - toString(). > > Good ? > > Maurice Even better ;) -- Lee Burrows ActionScripter