Hi, 2017-07-31 18:32 GMT+09:00 Jean-Philippe André <j...@videolan.org>:
> > > 2017-07-31 18:24 GMT+09:00 Simon Lees <sfl...@suse.de>: > >> >> >> On 31/07/17 18:23, Jean-Philippe André wrote: >> > Hello, >> > >> > >> > I was talking with Sanghyeon last week and realized that our use of >> > Efl.Orientation (interface) and Efl.Orient (enum) for UI elements did >> not >> > actually make perfect sense: >> > >> > 1. UI objects tend to have a default direction which is more like >> > "downwards" or "to the right". Not UP (which is orientation 0) >> > >> > 2. UI objects tend to be either horizontal or vertical, not necessarily >> > right/left/up/down >> > >> > 3. The degree value (0, 90, 180, 270) is not necessarily meaningful as >> > we're not rotating the objects, just defining a general direction in >> which >> > they work. >> > >> > >> > Are there any objections into splitting Orientation (for images, video >> and >> > probably the window itself, ...) and something like Direction (for UI >> > widgets, like box, panes, etc...)? >> > >> > >> > TIA, >> > >> >> Just remember for Right to Left languages UI elements that would >> normally be on the Left end up on the Right so left and right isn't >> really the best language either I think Qt uses something like Leading >> and Trailing for stuff that swaps properly for right to left and Left >> and Right if you wanted it fixed. I don't remember how well elm handles >> that though. >> >> > Very good point. I'll check what conventions are used elsewhere. > Thanks, > > I have introduced the enum Efl.Ui.Dir and the interface Efl.Ui.Direction and transformed all (EO) widgets to use it (except Panes but our best expert is on it right now). The values are: - default -> widget decides - up -> always up unless widget doesn't support - down -> always down unless widget doesn't support - vertical -> vertical is down or leaves the choice to the widget between up & down (depending on available space, etc...) - ltr/right -> always to the right unless widget doesn't support - rtl/left -> always to the left unless widget doesn't support - horizontal -> ltr by default, rtl if mirrored. also leaves the choice to the widget between ltr & rtl (depending on available space, etc...) Most widgets only implement horizontal vs. vertical so unsupported direction are converted to either of H or V. We still need to audit all our EO widgets to make sure they respect horizontal + mirrored properly. -- Jean-Philippe André ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel