From: Sean P. <sea...@ma...> - 2010-05-14 17:08:05
|
+adobe-source-devel I'd start by implementing a guide widget and/or an attachment attribute. A guide widget is just a widget that has a guide but no other dimension. Attachments attributes are a way to decorate an existing widget with a guide (such as attaching a guide on the left side). Both of these can be done client side, without modifying the layout engine. A couple of fixes/additions to the layout engine may be required to make this work well: 1) There isn't anyway to suppress the spacing on a widget so a guide widget will get inter item spacing on both sides. This could be worked around with the spacing attribute, but a better fix would be to suppress spacing for widgets with no dimension on an axis. 2) The same bug we discussed before with align fill not obeying guides can bite you. If you implement a guide widget or attachment attributes please discuss on the list so we can add the terminology to the standard terminology. A couple of comments on the image - For the first case, I'm not a fan of group boxes - too much visual clutter. I prefer separator lines. We should still support such layouts with the engine though. Adding a guide on each end of the rows and fixing (1) should give you this. Not sure why the second case can't be handled with two columns. Sean On May 14, 2010, at 6:55 AM, Kumar Lomash wrote: > Hi Sean, > > Generally, we want some controls to be aligned from both the sides > in a column. So, a very common practice is to put them in a column > and say align_fill horizontally. But, this solution would not work > when we are forced to keep these widgets in separate rows/columns. > Then, need for both forward and reverse guides arise (I am not sure > if it can be achieved with only one). > > In the attached snapshots, there are two scenarios which I am > guessing would be solved by the same “trick”. I have been trying to > implement them but nothing seems to work fully. > > Scenario description: > There are two scenarios, separated by a thick horizontal like. > Assume two separate layouts. None of the widget’s sizes are same by > default so we cannot assume that they will be of the same size > without any layout constraints. > 1. A widget and a group box in a column, two widgets inside > group box. All the 3 widgets should align from both the sides. > 2. A row with two widgets, another widget and again a row with > two widgets in a column > The red lines display expected alignments. > > Thanks for your help. > > Regards, > Lomash |