On Wed, 20 Oct 2010 09:41:44 +0200 Tom Hacohen <tom.haco...@partner.samsung.com> said:
> Let me explain, generally it is a per application decision (actually > taken from the translation file, by translating a special string), but, > even so, parts of the interface can be manually set to rtl/ltr (hence > the need for per object control). The most basic example is images. Some > of the images need to mirror, for example image used for elm_menu's > arrow (remember, it will be moved automatically to the left, and a right > facing arrow there will look weird), while others should not mirror, for > example the image in an elm_icon object. Therefore, I came up with the > following scheme: Each object has two flags, one that signifies the > current state (whether it's CURRENTLY rtl/ltr), and one that signifies > the behavior (AUTO/MANUAL) in MANUAL mode, the object's direction is > exactly what set by the programmer/designer, either by a direct call to > evas, or just by marking the flag in the edc. This will be use > automatically for images, ui-designers will have to explicitly set (in > the edje/code) that a specific image (like the one in elm_menu) is not > really a normal image, but it's use used for indication and should be > mirrored*. So generally you'll have a full interface in one direction, > and some objects in another direction. sounds to me like they need to have an manual mode where they provide a new description state for RTL mode per part for a manual mode (for example for flipping that arrow - you can't just flip the image pixels and expect it to work). auto-mode would just flip geometry - not image content. things not marked with manual or auto are left "as-is". now the question comes to - who controls the decision to be LTR or RTL. i'd say like scaling... same thing - and that also inherits from parents in elm. > So yeah, mostly what you said raster, you just flip (inside each evas > object, for example inside an edje layout) the UI i.e x1 becomes w - x2 > x2 = w - x1 (because you want to also keep x1 to be the upper left > corner) and in some cases like described above you also mirror images, > and yes, the designer can control whether one item should mirror or not, > but he does not need to write the layout twice, everything just works, > like magic :P (and since the feature is already implemented here, and > just the toggling is not yet implemented, I can testify from experience, > it's awesome.) the designer has to handle things like the arrow flips. remember the image may/will have shadowing, highlighting and so-on in it and when u just go flip it you flip the lighting too so some elements have different lighting origins and the ui looks wrong. so there needs to be a manual mode. > * - in the future I intend on supporting replacement layouts and > replacement images in edje just if someone wants to more fine-tune the > change, although, looking at how GTK+ are doing UI-mirroring, it's not > really needed. they don't quite have the power/flexibility and so on of edje. they have more built-in structure where edje is more loose. so since its more losse - more needs to be done by designers. > Regarding: > "imho all you need is the same as scale. you want a single global RTL or > LTR (default is LTR) and then per object an api call to set this > explicitly. the rest would be the job of something like elementary to > just set it on everything (like it does with scale etc.)." > > What if I want to change an object and all of it's children? The idea > was: each children with AUTO mode registers to his father's rtl changes > so this way when you change this property, it goes down the chain, you > don't think that's a good idea? scale does this too - in elm. the global scale is used... UNLESS a specific scale is set on a widget. children inherit the parent's scaling too. so it is exactly what you want. L:) -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel