From: Sean P. <sea...@ma...> - 2010-05-17 21:00:12
|
On May 17, 2010, at 3:10 AM, Kumar Lomash wrote: > Hi Sean, > > We already have a guide widget “guide_consumer” in dvaadameve and I > guess “row” should work as an attachment widget, so I guess we > already have the infrastructure required at client’s end. Although > some bugs can fixed like omitting no inter-widget spacing if size is > 0 and so on. > > Image: > 1. I tried your solution and it worked –thanks! And, you were > right to say that the bug with align_fill would bite me – I guess I > will have to wait till this bug is fixed to have all my layouts > properly ported to EVE2. No ETA on a fix - feel free to jump in. > 2. If I have two columns, then the two widgets in the second > column do not snap to first and third widgets of the first column. I > was hoping that guides would do the trick here but they do not seem > to be working as expected. Are there guide widgets in Adobe Begin? > If yes, then I can test the code in it at least. By default, columns mask baselines. You can fix that with a guide_mask attribute (pass an empty array to clear the default guide mask. Begin doesn't have a guide widget - but here is an example using a small button as a baseline guide placeholder: layout my_dialog { view dialog(name: localize("Two Columns")) { row() { column(guide_mask: []) { button(name: "Button 1"); button(name: "Button 2"); button(name: "Button 3"); } column(guide_mask: []) { button(name: "Button 1"); button(name: "baseline placeholder", size: @size_small); button(name: "Button 3"); } } } } Sean > > Regards, > Lomash > > From: Sean Parent [mailto:sea...@ma...] > Sent: 14 May 2010 22:38 > To: Kumar Lomash > Cc: Foster Brereton; asl [dev] > Subject: Re: Layout issues witn EVE > > +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 > > > > |